diff options
author | Mario <mario@mariovavti.com> | 2020-01-12 09:18:07 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2020-01-12 09:18:07 +0000 |
commit | 8cb968c4b03e5d5462edec56f31625e9f15a6a15 (patch) | |
tree | ccd1974ee57d17492a25846b2e4fae28b97c1e2f /vendor/sabre/dav/tests/Sabre/DAV/TemporaryFileFilterTest.php | |
parent | f645c6f3a57bf5f53bbb2bde362b2447f725c977 (diff) | |
download | volse-hubzilla-8cb968c4b03e5d5462edec56f31625e9f15a6a15.tar.gz volse-hubzilla-8cb968c4b03e5d5462edec56f31625e9f15a6a15.tar.bz2 volse-hubzilla-8cb968c4b03e5d5462edec56f31625e9f15a6a15.zip |
composer update sabre/dav
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/DAV/TemporaryFileFilterTest.php')
-rw-r--r-- | vendor/sabre/dav/tests/Sabre/DAV/TemporaryFileFilterTest.php | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/TemporaryFileFilterTest.php b/vendor/sabre/dav/tests/Sabre/DAV/TemporaryFileFilterTest.php index 352c8a3e7..bae5b58bf 100644 --- a/vendor/sabre/dav/tests/Sabre/DAV/TemporaryFileFilterTest.php +++ b/vendor/sabre/dav/tests/Sabre/DAV/TemporaryFileFilterTest.php @@ -22,7 +22,7 @@ class TemporaryFileFilterTest extends AbstractServer $this->server->httpRequest = ($request); $this->server->exec(); - $this->assertEquals('', $this->response->body); + $this->assertEquals('', $this->response->getBodyAsString()); $this->assertEquals(201, $this->response->status); $this->assertEquals('0', $this->response->getHeader('Content-Length')); @@ -37,7 +37,7 @@ class TemporaryFileFilterTest extends AbstractServer $this->server->httpRequest = ($request); $this->server->exec(); - $this->assertEquals('', $this->response->body); + $this->assertEquals('', $this->response->getBodyAsString()); $this->assertEquals(201, $this->response->status); $this->assertEquals([ 'X-Sabre-Temp' => ['true'], @@ -54,7 +54,7 @@ class TemporaryFileFilterTest extends AbstractServer $this->server->httpRequest = ($request); $this->server->exec(); - $this->assertEquals('', $this->response->body); + $this->assertEquals('', $this->response->getBodyAsString()); $this->assertEquals(201, $this->response->status); $this->assertEquals([ 'X-Sabre-Temp' => ['true'], @@ -78,7 +78,7 @@ class TemporaryFileFilterTest extends AbstractServer $this->server->httpRequest = ($request); $this->server->exec(); - $this->assertEquals('', $this->response->body); + $this->assertEquals('', $this->response->getBodyAsString()); $this->assertEquals(201, $this->response->status); $this->assertEquals([ 'X-Sabre-Temp' => ['true'], @@ -147,7 +147,7 @@ class TemporaryFileFilterTest extends AbstractServer $this->server->httpRequest = $request; $this->server->exec(); - $this->assertEquals('', $this->response->body); + $this->assertEquals('', $this->response->getBodyAsString()); $this->assertEquals(201, $this->response->status); $this->assertEquals([ 'X-Sabre-Temp' => ['true'], @@ -157,12 +157,12 @@ class TemporaryFileFilterTest extends AbstractServer $this->server->httpRequest = $request; $this->server->exec(); - $this->assertEquals(204, $this->response->status, "Incorrect status code received. Full body:\n".$this->response->body); + $this->assertEquals(204, $this->response->status, "Incorrect status code received. Full body:\n".$this->response->getBodyAsString()); $this->assertEquals([ 'X-Sabre-Temp' => ['true'], ], $this->response->getHeaders()); - $this->assertEquals('', $this->response->body); + $this->assertEquals('', $this->response->getBodyAsString()); } public function testPutPropfind() @@ -172,7 +172,8 @@ class TemporaryFileFilterTest extends AbstractServer $this->server->httpRequest = $request; $this->server->exec(); - $this->assertEquals('', $this->response->body); + $bodyAsString = $this->response->getBodyAsString(); + $this->assertEquals('', $bodyAsString); $this->assertEquals(201, $this->response->status); $this->assertEquals([ 'X-Sabre-Temp' => ['true'], @@ -183,13 +184,14 @@ class TemporaryFileFilterTest extends AbstractServer $this->server->httpRequest = ($request); $this->server->exec(); - $this->assertEquals(207, $this->response->status, 'Incorrect status code returned. Body: '.$this->response->body); + $bodyAsString = $this->response->getBodyAsString(); + $this->assertEquals(207, $this->response->status, 'Incorrect status code returned. Body: '.$bodyAsString); $this->assertEquals([ 'X-Sabre-Temp' => ['true'], 'Content-Type' => ['application/xml; charset=utf-8'], ], $this->response->getHeaders()); - $body = preg_replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/", 'xmlns\\1="urn:DAV"', $this->response->body); + $body = preg_replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/", 'xmlns\\1="urn:DAV"', $bodyAsString); $xml = simplexml_load_string($body); $xml->registerXPathNamespace('d', 'urn:DAV'); |