25 '{DAV:}displayname' =>
'd-name',
26 'principaluri' =>
'principals/user1',
34 $this->assertEquals(
'book1', $this->ab->getName());
40 $card = $this->ab->getChild(
'card1');
41 $this->assertInstanceOf(
'Sabre\\CardDAV\\Card', $card);
42 $this->assertEquals(
'card1', $card->getName());
51 $card = $this->ab->getChild(
'card3');
57 $cards = $this->ab->getChildren();
58 $this->assertEquals(2, count($cards));
60 $this->assertEquals(
'card1', $cards[0]->getName());
61 $this->assertEquals(
'card2', $cards[1]->getName());
70 $this->ab->createDirectory(
'name');
76 $file =
fopen(
'php://memory',
'r+');
79 $this->ab->createFile(
'card2', $file);
81 $this->assertEquals(
'foo', $this->backend->cards[
'foo'][
'card2']);
88 $this->assertEquals(1, count($this->backend->addressBooks));
97 $this->ab->setName(
'foo');
103 $this->assertNull($this->ab->getLastModified());
110 '{DAV:}displayname' =>
'barrr',
112 $this->ab->propPatch($propPatch);
113 $this->assertTrue($propPatch->commit());
115 $this->assertEquals(
'barrr', $this->backend->addressBooks[0][
'{DAV:}displayname']);
121 $props = $this->ab->getProperties([
'{DAV:}displayname']);
122 $this->assertEquals([
123 '{DAV:}displayname' =>
'd-name',
130 $this->assertEquals(
'principals/user1', $this->ab->getOwner());
131 $this->assertNull($this->ab->getGroup());
132 $this->assertEquals([
134 'privilege' =>
'{DAV:}all',
135 'principal' =>
'{DAV:}owner',
138 ], $this->ab->getACL());
147 $this->ab->setACL([]);
154 $this->ab->getSupportedPrivilegeSet()
161 $this->assertNull($this->ab->getSyncToken());
166 $this->assertNull($this->ab->getChanges(1, null));
172 $this->driver =
'sqlite';
173 $this->
dropTables([
'addressbooks',
'cards',
'addressbookchanges']);
179 $this->assertEquals(2,
$ab->getSyncToken());
184 $this->driver =
'sqlite';
185 $this->
dropTables([
'addressbooks',
'cards',
'addressbookchanges']);
191 $this->assertEquals(2,
$ab->getSyncToken());
testGetSupportedPrivilegeSet()
This class represents a set of properties that are going to be updated.
testGetChildNotFound()
Sabre
dropTables($tableNames)
Drops tables, if they exist.
The AddressBook class represents a CardDAV addressbook, owned by a specific user. ...
testCreateDirectory()
Sabre
createSchema($schemaName)
Uses .sql files from the examples directory to initialize the database.
testGetSyncTokenNoSyncSupport()
testGetChangesNoSyncSupport()