mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-07 17:08:48 +00:00
Initial Release of the calendar plugin
This commit is contained in:
parent
45cc9885fc
commit
7115197a33
561 changed files with 189494 additions and 0 deletions
27
dav/SabreDAV/tests/Sabre/CardDAV/AddressBookRootTest.php
Normal file
27
dav/SabreDAV/tests/Sabre/CardDAV/AddressBookRootTest.php
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
class Sabre_CardDAV_AddressBookRootTest extends PHPUnit_Framework_TestCase {
|
||||
|
||||
function testGetName() {
|
||||
|
||||
$pBackend = new Sabre_DAVACL_MockPrincipalBackend();
|
||||
$cBackend = new Sabre_CardDAV_Backend_Mock();
|
||||
$root = new Sabre_CardDAV_AddressBookRoot($pBackend, $cBackend);
|
||||
$this->assertEquals('addressbooks', $root->getName());
|
||||
|
||||
}
|
||||
|
||||
function testGetChildForPrincipal() {
|
||||
|
||||
$pBackend = new Sabre_DAVACL_MockPrincipalBackend();
|
||||
$cBackend = new Sabre_CardDAV_Backend_Mock();
|
||||
$root = new Sabre_CardDAV_AddressBookRoot($pBackend, $cBackend);
|
||||
|
||||
$children = $root->getChildren();
|
||||
$this->assertEquals(3, count($children));
|
||||
|
||||
$this->assertInstanceOf('Sabre_CardDAV_UserAddressBooks', $children[0]);
|
||||
$this->assertEquals('user1', $children[0]->getName());
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue