From 66effbfe0827fc61fff6d248797a894213ad20d6 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sat, 28 May 2016 17:46:24 +0200 Subject: upgrade to sabre32 --- .../dav/tests/Sabre/DAV/Browser/PluginTest.php | 54 +++++++++++----------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'vendor/sabre/dav/tests/Sabre/DAV/Browser/PluginTest.php') 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, '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()); } -- cgit v1.2.3