aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests/Sabre/DAV/TemporaryFileFilterTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/DAV/TemporaryFileFilterTest.php')
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/TemporaryFileFilterTest.php22
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');