Definition at line 11 of file AddressBookQueryTest.php.
◆ testAddressBookDepth0()
Sabre\CardDAV\AddressBookQueryTest::testAddressBookDepth0 |
( |
| ) |
|
Definition at line 282 of file AddressBookQueryTest.php.
References $request, and $response.
286 '/addressbooks/user1/book1',
291 '<?xml version="1.0"?> 292 <c:addressbook-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav"> 294 <c:address-data content-type="application/vcard+json" /> 297 </c:addressbook-query>' 302 $this->server->httpRequest =
$request;
305 $this->server->exec();
307 $this->assertEquals(415,
$response->status,
'Incorrect status code. Full response body:' .
$response->body);
foreach($paths as $path) $request
◆ testAddressBookProperties()
Sabre\CardDAV\AddressBookQueryTest::testAddressBookProperties |
( |
| ) |
|
Definition at line 310 of file AddressBookQueryTest.php.
References $client, $request, $response, and $result.
314 '/addressbooks/user1/book3',
319 '<?xml version="1.0"?> 320 <c:addressbook-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav"> 324 <c:prop name="BDAY"/> 328 </c:addressbook-query>' 333 $this->server->httpRequest =
$request;
336 $this->server->exec();
338 $this->assertEquals(207,
$response->status,
'Incorrect status code. Full response body:' .
$response->body);
341 $client =
new DAV\Client([
'baseUri' =>
'/']);
345 $this->assertEquals([
346 '/addressbooks/user1/book3/card3' => [
348 '{DAV:}getetag' =>
'"' . md5(
"BEGIN:VCARD\nVERSION:3.0\nUID:12345\nFN:Test-Card\nEMAIL;TYPE=home:bar@example.org\nEND:VCARD") .
'"',
349 '{urn:ietf:params:xml:ns:carddav}address-data' =>
"BEGIN:VCARD\r\nVERSION:3.0\r\nUID:12345\r\nFN:Test-Card\r\nEND:VCARD\r\n",
foreach($paths as $path) $request
if($_SERVER['argc']< 4) $client
◆ testJson()
Sabre\CardDAV\AddressBookQueryTest::testJson |
( |
| ) |
|
Definition at line 192 of file AddressBookQueryTest.php.
References $client, $request, $response, $result, and Sabre\VObject\Version\VERSION.
196 '/addressbooks/user1/book1/card1',
201 '<?xml version="1.0"?> 202 <c:addressbook-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav"> 204 <c:address-data content-type="application/vcard+json" /> 207 </c:addressbook-query>' 212 $this->server->httpRequest =
$request;
215 $this->server->exec();
217 $this->assertEquals(207,
$response->status,
'Incorrect status code. Full response body:' .
$response->body);
220 $client =
new DAV\Client([
'baseUri' =>
'/']);
226 $this->assertEquals([
227 '/addressbooks/user1/book1/card1' => [
229 '{DAV:}getetag' =>
'"' . md5(
"BEGIN:VCARD\nVERSION:3.0\nUID:12345\nEND:VCARD") .
'"',
230 '{urn:ietf:params:xml:ns:carddav}address-data' =>
'["vcard",[["version",{},"text","4.0"],["prodid",{},"text","-\/\/Sabre\/\/Sabre VObject ' . $vobjVersion .
'\/\/EN"],["uid",{},"text","12345"]]]',
foreach($paths as $path) $request
const VERSION
Full version number.
if($_SERVER['argc']< 4) $client
◆ testQuery()
Sabre\CardDAV\AddressBookQueryTest::testQuery |
( |
| ) |
|
Definition at line 13 of file AddressBookQueryTest.php.
References $client, $request, $response, and $result.
17 '/addressbooks/user1/book1',
22 '<?xml version="1.0"?> 23 <c:addressbook-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav"> 28 <c:prop-filter name="uid" /> 30 </c:addressbook-query>' 35 $this->server->httpRequest =
$request;
38 $this->server->exec();
40 $this->assertEquals(207,
$response->status,
'Incorrect status code. Full response body:' .
$response->body);
43 $client =
new DAV\Client([
'baseUri' =>
'/']);
48 '/addressbooks/user1/book1/card1' => [
50 '{DAV:}getetag' =>
'"' . md5(
"BEGIN:VCARD\nVERSION:3.0\nUID:12345\nEND:VCARD") .
'"',
53 '/addressbooks/user1/book1/card2' => [
55 '{DAV:}getetag' => null,
foreach($paths as $path) $request
if($_SERVER['argc']< 4) $client
◆ testQueryDepth0()
Sabre\CardDAV\AddressBookQueryTest::testQueryDepth0 |
( |
| ) |
|
Definition at line 63 of file AddressBookQueryTest.php.
References $client, $request, $response, and $result.
67 '/addressbooks/user1/book1/card1',
72 '<?xml version="1.0"?> 73 <c:addressbook-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav"> 78 <c:prop-filter name="uid" /> 80 </c:addressbook-query>' 85 $this->server->httpRequest =
$request;
88 $this->server->exec();
90 $this->assertEquals(207,
$response->status,
'Incorrect status code. Full response body:' .
$response->body);
93 $client =
new DAV\Client([
'baseUri' =>
'/']);
98 '/addressbooks/user1/book1/card1' => [
100 '{DAV:}getetag' =>
'"' . md5(
"BEGIN:VCARD\nVERSION:3.0\nUID:12345\nEND:VCARD") .
'"',
foreach($paths as $path) $request
if($_SERVER['argc']< 4) $client
◆ testQueryLimit()
Sabre\CardDAV\AddressBookQueryTest::testQueryLimit |
( |
| ) |
|
Definition at line 146 of file AddressBookQueryTest.php.
References $client, $request, $response, $result, and Sabre\HTTP\Sapi\createFromServerArray().
149 'REQUEST_METHOD' =>
'REPORT',
150 'REQUEST_URI' =>
'/addressbooks/user1/book1',
155 '<?xml version="1.0"?> 156 <c:addressbook-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav"> 161 <c:prop-filter name="uid" /> 163 <c:limit><c:nresults>1</c:nresults></c:limit> 164 </c:addressbook-query>' 169 $this->server->httpRequest =
$request;
172 $this->server->exec();
174 $this->assertEquals(207,
$response->status,
'Incorrect status code. Full response body:' .
$response->body);
177 $client =
new DAV\Client([
'baseUri' =>
'/']);
181 $this->assertEquals([
182 '/addressbooks/user1/book1/card1' => [
184 '{DAV:}getetag' =>
'"' . md5(
"BEGIN:VCARD\nVERSION:3.0\nUID:12345\nEND:VCARD") .
'"',
foreach($paths as $path) $request
if($_SERVER['argc']< 4) $client
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
◆ testQueryNoMatch()
Sabre\CardDAV\AddressBookQueryTest::testQueryNoMatch |
( |
| ) |
|
Definition at line 108 of file AddressBookQueryTest.php.
References $client, $request, $response, and $result.
112 '/addressbooks/user1/book1',
117 '<?xml version="1.0"?> 118 <c:addressbook-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav"> 123 <c:prop-filter name="email" /> 125 </c:addressbook-query>' 130 $this->server->httpRequest =
$request;
133 $this->server->exec();
135 $this->assertEquals(207,
$response->status,
'Incorrect status code. Full response body:' .
$response->body);
138 $client =
new DAV\Client([
'baseUri' =>
'/']);
142 $this->assertEquals([],
$result);
foreach($paths as $path) $request
if($_SERVER['argc']< 4) $client
◆ testVCard4()
Sabre\CardDAV\AddressBookQueryTest::testVCard4 |
( |
| ) |
|
Definition at line 237 of file AddressBookQueryTest.php.
References $client, $request, $response, $result, and Sabre\VObject\Version\VERSION.
241 '/addressbooks/user1/book1/card1',
246 '<?xml version="1.0"?> 247 <c:addressbook-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav"> 249 <c:address-data content-type="text/vcard" version="4.0" /> 252 </c:addressbook-query>' 257 $this->server->httpRequest =
$request;
260 $this->server->exec();
262 $this->assertEquals(207,
$response->status,
'Incorrect status code. Full response body:' .
$response->body);
265 $client =
new DAV\Client([
'baseUri' =>
'/']);
271 $this->assertEquals([
272 '/addressbooks/user1/book1/card1' => [
274 '{DAV:}getetag' =>
'"' . md5(
"BEGIN:VCARD\nVERSION:3.0\nUID:12345\nEND:VCARD") .
'"',
275 '{urn:ietf:params:xml:ns:carddav}address-data' =>
"BEGIN:VCARD\r\nVERSION:4.0\r\nPRODID:-//Sabre//Sabre VObject $vobjVersion//EN\r\nUID:12345\r\nEND:VCARD\r\n",
foreach($paths as $path) $request
const VERSION
Full version number.
if($_SERVER['argc']< 4) $client
The documentation for this class was generated from the following file: