1<?php
2
3namespace Sabre\CardDAV;
4
5use Sabre\DAV;
6
7class IDirectoryTest extends \PHPUnit_Framework_TestCase {
8
9    function testResourceType() {
10
11        $tree = array(
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', array('{DAV:}resourcetype'));
20        $this->assertTrue($props['{DAV:}resourcetype']->is('{' . Plugin::NS_CARDDAV . '}directory'));
21
22    }
23
24}
25
26class DirectoryMock extends DAV\SimpleCollection implements IDirectory {
27
28
29
30}
31