ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
AddressBookRootTest.php
Go to the documentation of this file.
1<?php
2
3namespace Sabre\CardDAV;
4
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}
An exception for terminatinating execution or to throw for unit testing.
$root
Definition: sabredav.php:45