aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalPropertySearchTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalPropertySearchTest.php')
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalPropertySearchTest.php28
1 files changed, 16 insertions, 12 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalPropertySearchTest.php b/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalPropertySearchTest.php
index 3bdcfbbbd..55c64721e 100644
--- a/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalPropertySearchTest.php
+++ b/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalPropertySearchTest.php
@@ -140,7 +140,8 @@ class PrincipalPropertySearchTest extends \PHPUnit\Framework\TestCase
$server->exec();
- $this->assertEquals(207, $server->httpResponse->status, $server->httpResponse->body);
+ $bodyAsString = $server->httpResponse->getBodyAsString();
+ $this->assertEquals(207, $server->httpResponse->status, $bodyAsString);
$this->assertEquals([
'X-Sabre-Version' => [DAV\Version::VERSION],
'Content-Type' => ['application/xml; charset=utf-8'],
@@ -158,7 +159,7 @@ class PrincipalPropertySearchTest extends \PHPUnit\Framework\TestCase
'/d:multistatus/d:response/d:propstat/d:status' => 4,
];
- $xml = simplexml_load_string($server->httpResponse->body);
+ $xml = simplexml_load_string($bodyAsString);
$xml->registerXPathNamespace('d', 'DAV:');
foreach ($check as $v1 => $v2) {
$xpath = is_int($v1) ? $v2 : $v1;
@@ -170,7 +171,7 @@ class PrincipalPropertySearchTest extends \PHPUnit\Framework\TestCase
$count = $v2;
}
- $this->assertEquals($count, count($result), 'we expected '.$count.' appearances of '.$xpath.' . We found '.count($result).'. Full response body: '.$server->httpResponse->body);
+ $this->assertEquals($count, count($result), 'we expected '.$count.' appearances of '.$xpath.' . We found '.count($result).'. Full response body: '.$server->httpResponse->getBodyAsString());
}
}
@@ -211,7 +212,8 @@ class PrincipalPropertySearchTest extends \PHPUnit\Framework\TestCase
$server->exec();
- $this->assertEquals(207, $server->httpResponse->status, $server->httpResponse->body);
+ $bodyAsString = $server->httpResponse->getBodyAsString();
+ $this->assertEquals(207, $server->httpResponse->status, $bodyAsString);
$this->assertEquals([
'X-Sabre-Version' => [DAV\Version::VERSION],
'Content-Type' => ['application/xml; charset=utf-8'],
@@ -229,7 +231,7 @@ class PrincipalPropertySearchTest extends \PHPUnit\Framework\TestCase
'/d:multistatus/d:response/d:propstat/d:status' => 0,
];
- $xml = simplexml_load_string($server->httpResponse->body);
+ $xml = simplexml_load_string($bodyAsString);
$xml->registerXPathNamespace('d', 'DAV:');
foreach ($check as $v1 => $v2) {
$xpath = is_int($v1) ? $v2 : $v1;
@@ -241,7 +243,7 @@ class PrincipalPropertySearchTest extends \PHPUnit\Framework\TestCase
$count = $v2;
}
- $this->assertEquals($count, count($result), 'we expected '.$count.' appearances of '.$xpath.' . We found '.count($result).'. Full response body: '.$server->httpResponse->body);
+ $this->assertEquals($count, count($result), 'we expected '.$count.' appearances of '.$xpath.' . We found '.count($result).'. Full response body: '.$server->httpResponse->getBodyAsString());
}
}
@@ -282,7 +284,8 @@ class PrincipalPropertySearchTest extends \PHPUnit\Framework\TestCase
$server->exec();
- $this->assertEquals(207, $server->httpResponse->status, $server->httpResponse->body);
+ $bodyAsString = $server->httpResponse->getBodyAsString();
+ $this->assertEquals(207, $server->httpResponse->status, $bodyAsString);
$this->assertEquals([
'X-Sabre-Version' => [DAV\Version::VERSION],
'Content-Type' => ['application/xml; charset=utf-8'],
@@ -300,7 +303,7 @@ class PrincipalPropertySearchTest extends \PHPUnit\Framework\TestCase
'/d:multistatus/d:response/d:propstat/d:status' => 4,
];
- $xml = simplexml_load_string($server->httpResponse->body);
+ $xml = simplexml_load_string($bodyAsString);
$xml->registerXPathNamespace('d', 'DAV:');
foreach ($check as $v1 => $v2) {
$xpath = is_int($v1) ? $v2 : $v1;
@@ -312,7 +315,7 @@ class PrincipalPropertySearchTest extends \PHPUnit\Framework\TestCase
$count = $v2;
}
- $this->assertEquals($count, count($result), 'we expected '.$count.' appearances of '.$xpath.' . We found '.count($result).'. Full response body: '.$server->httpResponse->body);
+ $this->assertEquals($count, count($result), 'we expected '.$count.' appearances of '.$xpath.' . We found '.count($result).'. Full response body: '.$server->httpResponse->getBodyAsString());
}
}
@@ -346,7 +349,8 @@ class PrincipalPropertySearchTest extends \PHPUnit\Framework\TestCase
$server->exec();
- $this->assertEquals(207, $server->httpResponse->status, $server->httpResponse->body);
+ $bodyAsString = $server->httpResponse->getBodyAsString();
+ $this->assertEquals(207, $server->httpResponse->status, $bodyAsString);
$this->assertEquals([
'X-Sabre-Version' => [DAV\Version::VERSION],
'Content-Type' => ['application/xml; charset=utf-8'],
@@ -358,7 +362,7 @@ class PrincipalPropertySearchTest extends \PHPUnit\Framework\TestCase
'/d:multistatus/d:response' => 0,
];
- $xml = simplexml_load_string($server->httpResponse->body);
+ $xml = simplexml_load_string($bodyAsString);
$xml->registerXPathNamespace('d', 'DAV:');
foreach ($check as $v1 => $v2) {
$xpath = is_int($v1) ? $v2 : $v1;
@@ -370,7 +374,7 @@ class PrincipalPropertySearchTest extends \PHPUnit\Framework\TestCase
$count = $v2;
}
- $this->assertEquals($count, count($result), 'we expected '.$count.' appearances of '.$xpath.' . We found '.count($result).'. Full response body: '.$server->httpResponse->body);
+ $this->assertEquals($count, count($result), 'we expected '.$count.' appearances of '.$xpath.' . We found '.count($result).'. Full response body: '.$server->httpResponse->getBodyAsString());
}
}
}