Definition at line 5 of file CardTest.php.
◆ setUp()
Sabre\CardDAV\CardTest::setUp |
( |
| ) |
|
Definition at line 16 of file CardTest.php.
18 $this->backend =
new Backend\Mock();
19 $this->card =
new Card(
24 'principaluri' =>
'principals/user1',
28 'addressbookid' =>
'foo',
◆ testACLMethods()
Sabre\CardDAV\CardTest::testACLMethods |
( |
| ) |
|
Definition at line 148 of file CardTest.php.
150 $this->assertEquals(
'principals/user1', $this->card->getOwner());
151 $this->assertNull($this->card->getGroup());
152 $this->assertEquals([
154 'privilege' =>
'{DAV:}all',
155 'principal' =>
'principals/user1',
158 ], $this->card->getACL());
◆ testDelete()
Sabre\CardDAV\CardTest::testDelete |
( |
| ) |
|
Definition at line 76 of file CardTest.php.
78 $this->card->delete();
79 $this->assertEquals(1, count($this->backend->cards[
'foo']));
◆ testGet()
Sabre\CardDAV\CardTest::testGet |
( |
| ) |
|
◆ testGet2()
Sabre\CardDAV\CardTest::testGet2 |
( |
| ) |
|
Definition at line 41 of file CardTest.php.
References $result.
43 $this->card =
new Card(
48 'principaluri' =>
'principals/user1',
52 'addressbookid' =>
'foo',
56 $this->assertEquals(
"BEGIN:VCARD\nVERSION:3.0\nUID:12345\nEND:VCARD",
$result);
◆ testGetContentType()
Sabre\CardDAV\CardTest::testGetContentType |
( |
| ) |
|
Definition at line 83 of file CardTest.php.
85 $this->assertEquals(
'text/vcard; charset=utf-8', $this->card->getContentType());
◆ testGetETag()
Sabre\CardDAV\CardTest::testGetETag |
( |
| ) |
|
Definition at line 89 of file CardTest.php.
91 $this->assertEquals(
'"' . md5(
'card') .
'"', $this->card->getETag());
◆ testGetETag2()
Sabre\CardDAV\CardTest::testGetETag2 |
( |
| ) |
|
Definition at line 95 of file CardTest.php.
References Sabre\CardDAV\CardTest\$card.
102 'principaluri' =>
'principals/user1',
106 'addressbookid' =>
'foo',
107 'carddata' =>
'card',
108 'etag' =>
'"blabla"',
111 $this->assertEquals(
'"blabla"',
$card->getETag());
◆ testGetLastModified()
Sabre\CardDAV\CardTest::testGetLastModified |
( |
| ) |
|
Definition at line 115 of file CardTest.php.
117 $this->assertEquals(null, $this->card->getLastModified());
◆ testGetSize()
Sabre\CardDAV\CardTest::testGetSize |
( |
| ) |
|
Definition at line 121 of file CardTest.php.
123 $this->assertEquals(4, $this->card->getSize());
124 $this->assertEquals(4, $this->card->getSize());
◆ testGetSize2()
Sabre\CardDAV\CardTest::testGetSize2 |
( |
| ) |
|
◆ testGetSupportedPrivilegeSet()
Sabre\CardDAV\CardTest::testGetSupportedPrivilegeSet |
( |
| ) |
|
Definition at line 202 of file CardTest.php.
205 $this->card->getSupportedPrivilegeSet()
◆ testOverrideACL()
Sabre\CardDAV\CardTest::testOverrideACL |
( |
| ) |
|
Definition at line 161 of file CardTest.php.
References Sabre\CardDAV\CardTest\$card.
168 'principaluri' =>
'principals/user1',
172 'addressbookid' =>
'foo',
173 'carddata' =>
'card',
176 'privilege' =>
'{DAV:}read',
177 'principal' =>
'principals/user1',
183 $this->assertEquals([
185 'privilege' =>
'{DAV:}read',
186 'principal' =>
'principals/user1',
◆ testPut()
Sabre\CardDAV\CardTest::testPut |
( |
| ) |
|
testGet
Definition at line 64 of file CardTest.php.
References $result.
66 $file =
fopen(
'php://memory',
'r+');
67 fwrite($file,
'newdata');
69 $this->card->put($file);
71 $this->assertEquals(
'newdata',
$result);
◆ testSetACL()
Sabre\CardDAV\CardTest::testSetACL |
( |
| ) |
|
◆ $backend
Sabre\CardDAV\CardTest::$backend |
|
protected |
◆ $card
Sabre\CardDAV\CardTest::$card |
|
protected |
The documentation for this class was generated from the following file:
- libs/composer/vendor/sabre/dav/tests/Sabre/CardDAV/CardTest.php