ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
IDirectoryTest.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Sabre\CardDAV;
4 
5 use Sabre\DAV;
6 
8 
9  function testResourceType() {
10 
11  $tree = [
12  new DirectoryMock('directory')
13  ];
14 
15  $server = new DAV\Server($tree);
16  $plugin = new Plugin();
17  $server->addPlugin($plugin);
18 
19  $props = $server->getProperties('directory', ['{DAV:}resourcetype']);
20  $this->assertTrue($props['{DAV:}resourcetype']->is('{' . Plugin::NS_CARDDAV . '}directory'));
21 
22  }
23 
24 }
25 
26 class DirectoryMock extends DAV\SimpleCollection implements IDirectory {
27 
28 
29 
30 }
IDirectory interface.
Definition: IDirectory.php:18
const NS_CARDDAV
xml namespace for CardDAV elements
Definition: Plugin.php:33
CardDAV plugin.
Definition: Plugin.php:23
$server
Definition: sabredav.php:48
Main DAV server class.
Definition: Server.php:23