aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests/Sabre/DAV/Browser/PluginTest.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-05-28 17:46:24 +0200
committerMario Vavti <mario@mariovavti.com>2016-05-28 17:46:24 +0200
commit66effbfe0827fc61fff6d248797a894213ad20d6 (patch)
tree0fbb5ca644e1140e5b3b44b1adc874043790c388 /vendor/sabre/dav/tests/Sabre/DAV/Browser/PluginTest.php
parentac4688eac087854bf8cb0c893d7a79052ad63a20 (diff)
downloadvolse-hubzilla-66effbfe0827fc61fff6d248797a894213ad20d6.tar.gz
volse-hubzilla-66effbfe0827fc61fff6d248797a894213ad20d6.tar.bz2
volse-hubzilla-66effbfe0827fc61fff6d248797a894213ad20d6.zip
upgrade to sabre32
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/DAV/Browser/PluginTest.php')
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/Browser/PluginTest.php54
1 files changed, 27 insertions, 27 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/Browser/PluginTest.php b/vendor/sabre/dav/tests/Sabre/DAV/Browser/PluginTest.php
index 00beea9f2..f20c50f86 100644
--- a/vendor/sabre/dav/tests/Sabre/DAV/Browser/PluginTest.php
+++ b/vendor/sabre/dav/tests/Sabre/DAV/Browser/PluginTest.php
@@ -28,16 +28,16 @@ class PluginTest extends DAV\AbstractServer{
$this->assertEquals(200, $this->response->getStatus(), "Incorrect status received. Full response body: " . $this->response->getBodyAsString());
$this->assertEquals(
[
- 'X-Sabre-Version' => [DAV\Version::VERSION],
- 'Content-Type' => ['text/html; charset=utf-8'],
- 'Content-Security-Policy' => ["img-src 'self'; style-src 'self';"]
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Type' => ['text/html; charset=utf-8'],
+ 'Content-Security-Policy' => ["default-src 'none'; img-src 'self'; style-src 'self'; font-src 'self';"]
],
$this->response->getHeaders()
);
$body = $this->response->getBodyAsString();
$this->assertTrue(strpos($body, '<title>dir') !== false, $body);
- $this->assertTrue(strpos($body, '<a href="/dir/child.txt">')!==false);
+ $this->assertTrue(strpos($body, '<a href="/dir/child.txt">') !== false);
}
@@ -54,16 +54,16 @@ class PluginTest extends DAV\AbstractServer{
$this->assertEquals(200, $this->response->getStatus(), "Incorrect status received. Full response body: " . $this->response->getBodyAsString());
$this->assertEquals(
[
- 'X-Sabre-Version' => [DAV\Version::VERSION],
- 'Content-Type' => ['text/html; charset=utf-8'],
- 'Content-Security-Policy' => ["img-src 'self'; style-src 'self';"]
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Type' => ['text/html; charset=utf-8'],
+ 'Content-Security-Policy' => ["default-src 'none'; img-src 'self'; style-src 'self'; font-src 'self';"]
],
$this->response->getHeaders()
);
$body = $this->response->getBodyAsString();
$this->assertTrue(strpos($body, '<title>dir') !== false, $body);
- $this->assertTrue(strpos($body, '<a href="/dir/child.txt">')!==false);
+ $this->assertTrue(strpos($body, '<a href="/dir/child.txt">') !== false);
}
function testCollectionGetRoot() {
@@ -75,17 +75,17 @@ class PluginTest extends DAV\AbstractServer{
$this->assertEquals(200, $this->response->status, "Incorrect status received. Full response body: " . $this->response->getBodyAsString());
$this->assertEquals(
[
- 'X-Sabre-Version' => [DAV\Version::VERSION],
- 'Content-Type' => ['text/html; charset=utf-8'],
- 'Content-Security-Policy' => ["img-src 'self'; style-src 'self';"]
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Type' => ['text/html; charset=utf-8'],
+ 'Content-Security-Policy' => ["default-src 'none'; img-src 'self'; style-src 'self'; font-src 'self';"]
],
$this->response->getHeaders()
);
$body = $this->response->getBodyAsString();
$this->assertTrue(strpos($body, '<title>/') !== false, $body);
- $this->assertTrue(strpos($body, '<a href="/dir/">')!==false);
- $this->assertTrue(strpos($body, '<span class="btn disabled">')!==false);
+ $this->assertTrue(strpos($body, '<a href="/dir/">') !== false);
+ $this->assertTrue(strpos($body, '<span class="btn disabled">') !== false);
}
@@ -122,15 +122,15 @@ class PluginTest extends DAV\AbstractServer{
function testPostMkCol() {
- $serverVars = array(
+ $serverVars = [
'REQUEST_URI' => '/',
'REQUEST_METHOD' => 'POST',
- 'CONTENT_TYPE' => 'application/x-www-form-urlencoded',
- );
- $postVars = array(
+ 'CONTENT_TYPE' => 'application/x-www-form-urlencoded',
+ ];
+ $postVars = [
'sabreAction' => 'mkcol',
- 'name' => 'new_collection',
- );
+ 'name' => 'new_collection',
+ ];
$request = HTTP\Sapi::createFromServerArray($serverVars);
$request->setPostData($postVars);
@@ -138,10 +138,10 @@ class PluginTest extends DAV\AbstractServer{
$this->server->exec();
$this->assertEquals(302, $this->response->status);
- $this->assertEquals(array(
+ $this->assertEquals([
'X-Sabre-Version' => [DAV\Version::VERSION],
- 'Location' => ['/'],
- ), $this->response->getHeaders());
+ 'Location' => ['/'],
+ ], $this->response->getHeaders());
$this->assertTrue(is_dir(SABRE_TEMPDIR . '/new_collection'));
@@ -155,11 +155,11 @@ class PluginTest extends DAV\AbstractServer{
$this->assertEquals(200, $this->response->getStatus(), 'Error: ' . $this->response->body);
$this->assertEquals([
- 'X-Sabre-Version' => [DAV\Version::VERSION],
- 'Content-Type' => ['image/vnd.microsoft.icon'],
- 'Content-Length' => ['4286'],
- 'Cache-Control' => ['public, max-age=1209600'],
- 'Content-Security-Policy' => ["img-src 'self'; style-src 'self';"]
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Type' => ['image/vnd.microsoft.icon'],
+ 'Content-Length' => ['4286'],
+ 'Cache-Control' => ['public, max-age=1209600'],
+ 'Content-Security-Policy' => ["default-src 'none'; img-src 'self'; style-src 'self'; font-src 'self';"]
], $this->response->getHeaders());
}