aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalPropertySearchTest.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-11-05 08:46:42 +0000
committerMario <mario@mariovavti.com>2020-11-05 08:46:42 +0000
commitbafbf0416462c6f18c3fb6c8c06a063c8d6fdae6 (patch)
tree8929845be585b09d0f420621281c5531e1efad3e /vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalPropertySearchTest.php
parent6f93d9848c43019d43ea76c27d42d657ba031cd7 (diff)
parentfdefa101d84dc2a9424eaedbdb003a4c30ec5d01 (diff)
downloadvolse-hubzilla-5.0.tar.gz
volse-hubzilla-5.0.tar.bz2
volse-hubzilla-5.0.zip
Merge branch '5.0RC'5.0
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalPropertySearchTest.php')
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalPropertySearchTest.php30
1 files changed, 16 insertions, 14 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalPropertySearchTest.php b/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalPropertySearchTest.php
index 3bdcfbbbd..6883f25b4 100644
--- a/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalPropertySearchTest.php
+++ b/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalPropertySearchTest.php
@@ -7,8 +7,6 @@ namespace Sabre\DAVACL;
use Sabre\DAV;
use Sabre\HTTP;
-require_once 'Sabre/HTTP/ResponseMock.php';
-
class PrincipalPropertySearchTest extends \PHPUnit\Framework\TestCase
{
public function getServer()
@@ -140,7 +138,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 +157,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 +169,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 +210,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 +229,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 +241,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 +282,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 +301,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 +313,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 +347,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 +360,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 +372,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());
}
}
}