◆ getServer()
Sabre\DAVACL\PrincipalPropertySearchTest::getServer |
( |
| ) |
|
◆ testAND()
Sabre\DAVACL\PrincipalPropertySearchTest::testAND |
( |
| ) |
|
Definition at line 181 of file PrincipalPropertySearchTest.php.
References $request, $result, $server, $xml, Sabre\HTTP\Sapi\createFromServerArray(), Sabre\DAVACL\PrincipalPropertySearchTest\getServer(), and Sabre\DAV\Version\VERSION.
183 $xml =
'<?xml version="1.0"?> 184 <d:principal-property-search xmlns:d="DAV:"> 185 <d:apply-to-principal-collection-set /> 190 <d:match>user</d:match> 196 <d:match>bar</d:match> 200 <d:getcontentlength /> 202 </d:principal-property-search>';
205 'REQUEST_METHOD' =>
'REPORT',
207 'REQUEST_URI' =>
'/',
218 $this->assertEquals(207,
$server->httpResponse->status,
$server->httpResponse->body);
219 $this->assertEquals([
221 'Content-Type' => [
'application/xml; charset=utf-8'],
222 'Vary' => [
'Brief,Prefer'],
223 ],
$server->httpResponse->getHeaders());
228 '/d:multistatus/d:response' => 0,
229 '/d:multistatus/d:response/d:href' => 0,
230 '/d:multistatus/d:response/d:propstat' => 0,
231 '/d:multistatus/d:response/d:propstat/d:prop' => 0,
232 '/d:multistatus/d:response/d:propstat/d:prop/d:displayname' => 0,
233 '/d:multistatus/d:response/d:propstat/d:prop/d:getcontentlength' => 0,
234 '/d:multistatus/d:response/d:propstat/d:status' => 0,
237 $xml = simplexml_load_string(
$server->httpResponse->body);
238 $xml->registerXPathNamespace(
'd',
'DAV:');
239 foreach ($check as $v1 => $v2) {
241 $xpath = is_int($v1) ? $v2 : $v1;
246 if (!is_int($v1)) $count = $v2;
248 $this->assertEquals($count, count(
$result),
'we expected ' . $count .
' appearances of ' . $xpath .
' . We found ' . count(
$result) .
'. Full response body: ' .
$server->httpResponse->body);
foreach($paths as $path) $request
const VERSION
Full version number.
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
◆ testCorrect()
Sabre\DAVACL\PrincipalPropertySearchTest::testCorrect |
( |
| ) |
|
Definition at line 114 of file PrincipalPropertySearchTest.php.
References $request, $result, $server, $xml, Sabre\HTTP\Sapi\createFromServerArray(), Sabre\DAVACL\PrincipalPropertySearchTest\getServer(), and Sabre\DAV\Version\VERSION.
116 $xml =
'<?xml version="1.0"?> 117 <d:principal-property-search xmlns:d="DAV:"> 118 <d:apply-to-principal-collection-set /> 123 <d:match>user</d:match> 127 <d:getcontentlength /> 129 </d:principal-property-search>';
132 'REQUEST_METHOD' =>
'REPORT',
134 'REQUEST_URI' =>
'/',
145 $this->assertEquals(207,
$server->httpResponse->status,
$server->httpResponse->body);
146 $this->assertEquals([
148 'Content-Type' => [
'application/xml; charset=utf-8'],
149 'Vary' => [
'Brief,Prefer'],
150 ],
$server->httpResponse->getHeaders());
155 '/d:multistatus/d:response' => 2,
156 '/d:multistatus/d:response/d:href' => 2,
157 '/d:multistatus/d:response/d:propstat' => 4,
158 '/d:multistatus/d:response/d:propstat/d:prop' => 4,
159 '/d:multistatus/d:response/d:propstat/d:prop/d:displayname' => 2,
160 '/d:multistatus/d:response/d:propstat/d:prop/d:getcontentlength' => 2,
161 '/d:multistatus/d:response/d:propstat/d:status' => 4,
164 $xml = simplexml_load_string(
$server->httpResponse->body);
165 $xml->registerXPathNamespace(
'd',
'DAV:');
166 foreach ($check as $v1 => $v2) {
168 $xpath = is_int($v1) ? $v2 : $v1;
173 if (!is_int($v1)) $count = $v2;
175 $this->assertEquals($count, count(
$result),
'we expected ' . $count .
' appearances of ' . $xpath .
' . We found ' . count(
$result) .
'. Full response body: ' .
$server->httpResponse->body);
foreach($paths as $path) $request
const VERSION
Full version number.
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
◆ testDepth1()
Sabre\DAVACL\PrincipalPropertySearchTest::testDepth1 |
( |
| ) |
|
Definition at line 36 of file PrincipalPropertySearchTest.php.
References $request, $server, $xml, Sabre\HTTP\Sapi\createFromServerArray(), Sabre\DAVACL\PrincipalPropertySearchTest\getServer(), and Sabre\DAV\Version\VERSION.
38 $xml =
'<?xml version="1.0"?> 39 <d:principal-property-search xmlns:d="DAV:"> 44 <d:match>user</d:match> 48 <d:getcontentlength /> 50 </d:principal-property-search>';
53 'REQUEST_METHOD' =>
'REPORT',
55 'REQUEST_URI' =>
'/principals',
66 $this->assertEquals(400,
$server->httpResponse->getStatus(),
$server->httpResponse->getBodyAsString());
69 'Content-Type' => [
'application/xml; charset=utf-8'],
70 ],
$server->httpResponse->getHeaders());
foreach($paths as $path) $request
const VERSION
Full version number.
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
◆ testOR()
Sabre\DAVACL\PrincipalPropertySearchTest::testOR |
( |
| ) |
|
Definition at line 253 of file PrincipalPropertySearchTest.php.
References $request, $result, $server, $xml, Sabre\HTTP\Sapi\createFromServerArray(), Sabre\DAVACL\PrincipalPropertySearchTest\getServer(), and Sabre\DAV\Version\VERSION.
255 $xml =
'<?xml version="1.0"?> 256 <d:principal-property-search xmlns:d="DAV:" test="anyof"> 257 <d:apply-to-principal-collection-set /> 262 <d:match>user</d:match> 268 <d:match>bar</d:match> 272 <d:getcontentlength /> 274 </d:principal-property-search>';
277 'REQUEST_METHOD' =>
'REPORT',
279 'REQUEST_URI' =>
'/',
290 $this->assertEquals(207,
$server->httpResponse->status,
$server->httpResponse->body);
291 $this->assertEquals([
293 'Content-Type' => [
'application/xml; charset=utf-8'],
294 'Vary' => [
'Brief,Prefer'],
295 ],
$server->httpResponse->getHeaders());
300 '/d:multistatus/d:response' => 2,
301 '/d:multistatus/d:response/d:href' => 2,
302 '/d:multistatus/d:response/d:propstat' => 4,
303 '/d:multistatus/d:response/d:propstat/d:prop' => 4,
304 '/d:multistatus/d:response/d:propstat/d:prop/d:displayname' => 2,
305 '/d:multistatus/d:response/d:propstat/d:prop/d:getcontentlength' => 2,
306 '/d:multistatus/d:response/d:propstat/d:status' => 4,
309 $xml = simplexml_load_string(
$server->httpResponse->body);
310 $xml->registerXPathNamespace(
'd',
'DAV:');
311 foreach ($check as $v1 => $v2) {
313 $xpath = is_int($v1) ? $v2 : $v1;
318 if (!is_int($v1)) $count = $v2;
320 $this->assertEquals($count, count(
$result),
'we expected ' . $count .
' appearances of ' . $xpath .
' . We found ' . count(
$result) .
'. Full response body: ' .
$server->httpResponse->body);
foreach($paths as $path) $request
const VERSION
Full version number.
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
◆ testUnknownSearchField()
Sabre\DAVACL\PrincipalPropertySearchTest::testUnknownSearchField |
( |
| ) |
|
Definition at line 75 of file PrincipalPropertySearchTest.php.
References $request, $server, $xml, Sabre\HTTP\Sapi\createFromServerArray(), Sabre\DAVACL\PrincipalPropertySearchTest\getServer(), and Sabre\DAV\Version\VERSION.
77 $xml =
'<?xml version="1.0"?> 78 <d:principal-property-search xmlns:d="DAV:"> 83 <d:match>user</d:match> 87 <d:getcontentlength /> 89 </d:principal-property-search>';
92 'REQUEST_METHOD' =>
'REPORT',
94 'REQUEST_URI' =>
'/principals',
105 $this->assertEquals(207,
$server->httpResponse->getStatus(),
"Full body: " .
$server->httpResponse->getBodyAsString());
106 $this->assertEquals([
108 'Content-Type' => [
'application/xml; charset=utf-8'],
109 'Vary' => [
'Brief,Prefer'],
110 ],
$server->httpResponse->getHeaders());
foreach($paths as $path) $request
const VERSION
Full version number.
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
◆ testWrongUri()
Sabre\DAVACL\PrincipalPropertySearchTest::testWrongUri |
( |
| ) |
|
Definition at line 325 of file PrincipalPropertySearchTest.php.
References $request, $result, $server, $xml, Sabre\HTTP\Sapi\createFromServerArray(), Sabre\DAVACL\PrincipalPropertySearchTest\getServer(), and Sabre\DAV\Version\VERSION.
327 $xml =
'<?xml version="1.0"?> 328 <d:principal-property-search xmlns:d="DAV:"> 333 <d:match>user</d:match> 337 <d:getcontentlength /> 339 </d:principal-property-search>';
342 'REQUEST_METHOD' =>
'REPORT',
344 'REQUEST_URI' =>
'/',
355 $this->assertEquals(207,
$server->httpResponse->status,
$server->httpResponse->body);
356 $this->assertEquals([
358 'Content-Type' => [
'application/xml; charset=utf-8'],
359 'Vary' => [
'Brief,Prefer'],
360 ],
$server->httpResponse->getHeaders());
365 '/d:multistatus/d:response' => 0,
368 $xml = simplexml_load_string(
$server->httpResponse->body);
369 $xml->registerXPathNamespace(
'd',
'DAV:');
370 foreach ($check as $v1 => $v2) {
372 $xpath = is_int($v1) ? $v2 : $v1;
377 if (!is_int($v1)) $count = $v2;
379 $this->assertEquals($count, count(
$result),
'we expected ' . $count .
' appearances of ' . $xpath .
' . We found ' . count(
$result) .
'. Full response body: ' .
$server->httpResponse->body);
foreach($paths as $path) $request
const VERSION
Full version number.
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
The documentation for this class was generated from the following file: