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 --- .../sabre/dav/tests/Sabre/DAV/FSExt/ServerTest.php | 64 +++++++++++----------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'vendor/sabre/dav/tests/Sabre/DAV/FSExt/ServerTest.php') diff --git a/vendor/sabre/dav/tests/Sabre/DAV/FSExt/ServerTest.php b/vendor/sabre/dav/tests/Sabre/DAV/FSExt/ServerTest.php index 63d858de1..20fca490a 100644 --- a/vendor/sabre/dav/tests/Sabre/DAV/FSExt/ServerTest.php +++ b/vendor/sabre/dav/tests/Sabre/DAV/FSExt/ServerTest.php @@ -28,7 +28,7 @@ class ServerTest extends DAV\AbstractServer{ 'Content-Type' => ['application/octet-stream'], 'Content-Length' => [13], 'Last-Modified' => [HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($filename)))], - 'ETag' => ['"' . sha1(fileinode($filename ) . filesize($filename) . filemtime($filename)) . '"'], + 'ETag' => ['"' . sha1(fileinode($filename) . filesize($filename) . filemtime($filename)) . '"'], ], $this->response->getHeaders() ); @@ -50,12 +50,12 @@ class ServerTest extends DAV\AbstractServer{ 'Content-Type' => ['application/octet-stream'], 'Content-Length' => [13], 'Last-Modified' => [HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt')))], - 'ETag' => ['"' . sha1(fileinode($filename ) . filesize($filename) . filemtime($filename)) . '"'], + 'ETag' => ['"' . sha1(fileinode($filename) . filesize($filename) . filemtime($filename)) . '"'], ], $this->response->getHeaders() ); - $this->assertEquals(200,$this->response->status); + $this->assertEquals(200, $this->response->status); $this->assertEquals('', $this->response->body); } @@ -71,12 +71,12 @@ class ServerTest extends DAV\AbstractServer{ $this->assertEquals([ 'X-Sabre-Version' => [DAV\Version::VERSION], 'Content-Length' => ['0'], - 'ETag' => ['"' . sha1(fileinode($filename ) . filesize($filename) . filemtime($filename)) . '"'], + 'ETag' => ['"' . sha1(fileinode($filename) . filesize($filename) . filemtime($filename)) . '"'], ], $this->response->getHeaders()); $this->assertEquals(201, $this->response->status); $this->assertEquals('', $this->response->body); - $this->assertEquals('Testing new file',file_get_contents($filename)); + $this->assertEquals('Testing new file', file_get_contents($filename)); } @@ -89,11 +89,11 @@ class ServerTest extends DAV\AbstractServer{ $this->assertEquals([ 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - ],$this->response->getHeaders()); + 'Content-Type' => ['application/xml; charset=utf-8'], + ], $this->response->getHeaders()); $this->assertEquals(412, $this->response->status); - $this->assertNotEquals('Testing new file',file_get_contents($this->tempDir . '/test.txt')); + $this->assertNotEquals('Testing new file', file_get_contents($this->tempDir . '/test.txt')); } @@ -105,8 +105,8 @@ class ServerTest extends DAV\AbstractServer{ $this->assertEquals([ 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Length' => ['0'], - ],$this->response->getHeaders()); + 'Content-Length' => ['0'], + ], $this->response->getHeaders()); $this->assertEquals(201, $this->response->status); $this->assertEquals('', $this->response->body); @@ -125,7 +125,7 @@ class ServerTest extends DAV\AbstractServer{ $this->assertEquals(204, $this->response->status); $this->assertEquals('', $this->response->body); - $this->assertEquals('Testing updated file',file_get_contents($this->tempDir . '/test.txt')); + $this->assertEquals('Testing updated file', file_get_contents($this->tempDir . '/test.txt')); } @@ -137,8 +137,8 @@ class ServerTest extends DAV\AbstractServer{ $this->assertEquals([ 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Length' => ['0'], - ],$this->response->getHeaders()); + 'Content-Length' => ['0'], + ], $this->response->getHeaders()); $this->assertEquals(204, $this->response->status); $this->assertEquals('', $this->response->body); @@ -148,8 +148,8 @@ class ServerTest extends DAV\AbstractServer{ function testDeleteDirectory() { - mkdir($this->tempDir.'/testcol'); - file_put_contents($this->tempDir.'/testcol/test.txt','Hi! I\'m a file with a short lifespan'); + mkdir($this->tempDir . '/testcol'); + file_put_contents($this->tempDir . '/testcol/test.txt', 'Hi! I\'m a file with a short lifespan'); $request = new HTTP\Request('DELETE', '/testcol'); $this->server->httpRequest = ($request); @@ -157,8 +157,8 @@ class ServerTest extends DAV\AbstractServer{ $this->assertEquals([ 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Length' => ['0'], - ],$this->response->getHeaders()); + 'Content-Length' => ['0'], + ], $this->response->getHeaders()); $this->assertEquals(204, $this->response->status); $this->assertEquals('', $this->response->body); $this->assertFalse(file_exists($this->tempDir . '/testcol')); @@ -172,12 +172,12 @@ class ServerTest extends DAV\AbstractServer{ $this->server->exec(); $this->assertEquals([ - 'DAV' => ['1, 3, extended-mkcol'], - 'MS-Author-Via' => ['DAV'], - 'Allow' => ['OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT'], - 'Accept-Ranges' => ['bytes'], - 'Content-Length' => ['0'], - 'X-Sabre-Version'=> [DAV\Version::VERSION], + 'DAV' => ['1, 3, extended-mkcol'], + 'MS-Author-Via' => ['DAV'], + 'Allow' => ['OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT'], + 'Accept-Ranges' => ['bytes'], + 'Content-Length' => ['0'], + 'X-Sabre-Version' => [DAV\Version::VERSION], ], $this->response->getHeaders()); $this->assertEquals(200, $this->response->status); @@ -187,7 +187,7 @@ class ServerTest extends DAV\AbstractServer{ function testMove() { - mkdir($this->tempDir.'/testcol'); + mkdir($this->tempDir . '/testcol'); $request = new HTTP\Request('MOVE', '/test.txt', ['Destination' => '/testcol/test2.txt']); $this->server->httpRequest = ($request); @@ -197,9 +197,9 @@ class ServerTest extends DAV\AbstractServer{ $this->assertEquals('', $this->response->body); $this->assertEquals([ - 'Content-Length' => ['0'], - 'X-Sabre-Version'=> [DAV\Version::VERSION], - ],$this->response->getHeaders()); + 'Content-Length' => ['0'], + 'X-Sabre-Version' => [DAV\Version::VERSION], + ], $this->response->getHeaders()); $this->assertTrue( is_file($this->tempDir . '/testcol/test2.txt') @@ -217,8 +217,8 @@ class ServerTest extends DAV\AbstractServer{ */ function testMoveOtherObject() { - mkdir($this->tempDir.'/tree1'); - mkdir($this->tempDir.'/tree2'); + mkdir($this->tempDir . '/tree1'); + mkdir($this->tempDir . '/tree2'); $tree = new DAV\Tree(new DAV\SimpleCollection('root', [ new DAV\FS\Directory($this->tempDir . '/tree1'), @@ -234,9 +234,9 @@ class ServerTest extends DAV\AbstractServer{ $this->assertEquals('', $this->response->body); $this->assertEquals([ - 'Content-Length' => ['0'], - 'X-Sabre-Version'=> [DAV\Version::VERSION], - ],$this->response->getHeaders()); + 'Content-Length' => ['0'], + 'X-Sabre-Version' => [DAV\Version::VERSION], + ], $this->response->getHeaders()); $this->assertTrue( is_dir($this->tempDir . '/tree2/tree1') -- cgit v1.2.3