ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
AddressBookRootTest.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Sabre\CardDAV;
4 
5 use Sabre\DAVACL;
6 
8 
9  function testGetName() {
10 
11  $pBackend = new DAVACL\PrincipalBackend\Mock();
12  $cBackend = new Backend\Mock();
13  $root = new AddressBookRoot($pBackend, $cBackend);
14  $this->assertEquals('addressbooks', $root->getName());
15 
16  }
17 
19 
20  $pBackend = new DAVACL\PrincipalBackend\Mock();
21  $cBackend = new Backend\Mock();
22  $root = new AddressBookRoot($pBackend, $cBackend);
23 
24  $children = $root->getChildren();
25  $this->assertEquals(3, count($children));
26 
27  $this->assertInstanceOf('Sabre\\CardDAV\\AddressBookHome', $children[0]);
28  $this->assertEquals('user1', $children[0]->getName());
29 
30  }
31 }
$root
Definition: sabredav.php:45
AddressBook rootnode.