From 03b31d113ea316c8384a4cbf3d27ca22bb528eac Mon Sep 17 00:00:00 2001 From: Klaus Weidenbach Date: Sat, 28 Jun 2014 22:28:08 +0200 Subject: Update SabreDAV from 1.8.9 to 1.8.10. --- .../tests/Sabre/DAV/PartialUpdate/PluginTest.php | 24 ++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'vendor/sabre/dav/tests/Sabre/DAV/PartialUpdate/PluginTest.php') diff --git a/vendor/sabre/dav/tests/Sabre/DAV/PartialUpdate/PluginTest.php b/vendor/sabre/dav/tests/Sabre/DAV/PartialUpdate/PluginTest.php index 7b90429d4..32f7e4e2c 100644 --- a/vendor/sabre/dav/tests/Sabre/DAV/PartialUpdate/PluginTest.php +++ b/vendor/sabre/dav/tests/Sabre/DAV/PartialUpdate/PluginTest.php @@ -103,7 +103,7 @@ class PluginTest extends \Sabre\DAVServerTest { ); $response = $this->request($request); - $this->assertEquals('HTTP/1.1 416 Requested Range Not Satisfiable', $response->status, 'Full response body:' . $response->body); + $this->assertEquals('HTTP/1.1 411 Length Required', $response->status, 'Full response body:' . $response->body); } @@ -123,7 +123,27 @@ class PluginTest extends \Sabre\DAVServerTest { $response = $this->request($request); $this->assertEquals('HTTP/1.1 204 No Content', $response->status, 'Full response body:' . $response->body); - $this->assertEquals('00111000', $this->node->get()); + $this->assertEquals('00011100', $this->node->get()); + + } + + public function testPatchNoEndRange() { + + $this->node->put('00000'); + $request = new HTTP\Request(array( + 'REQUEST_METHOD' => 'PATCH', + 'REQUEST_URI' => '/partial', + 'HTTP_X_UPDATE_RANGE' => 'bytes=3-', + 'HTTP_CONTENT_TYPE' => 'application/x-sabredav-partialupdate', + 'HTTP_CONTENT_LENGTH' => 3, + )); + $request->setBody( + '111' + ); + $response = $this->request($request); + + $this->assertEquals('HTTP/1.1 204 No Content', $response->status, 'Full response body:' . $response->body); + $this->assertEquals('00111', $this->node->get()); } -- cgit v1.2.3