friendica-addons/dav/SabreDAV/tests/Sabre/CardDAV/IDirectoryTest.php

26 lines
659 B
PHP
Raw Normal View History

2012-06-03 18:19:28 +00:00
<?php
class Sabre_CardDAV_IDirectoryTest extends PHPUnit_Framework_TestCase {
function testResourceType() {
$tree = array(
new Sabre_CardDAV_DirectoryMock('directory')
);
$server = new Sabre_DAV_Server($tree);
$plugin = new Sabre_CardDAV_Plugin();
$server->addPlugin($plugin);
$props = $server->getProperties('directory', array('{DAV:}resourcetype'));
$this->assertTrue($props['{DAV:}resourcetype']->is('{' . Sabre_CardDAV_Plugin::NS_CARDDAV . '}directory'));
}
}
class Sabre_CardDAV_DirectoryMock extends Sabre_DAV_SimpleCollection implements Sabre_CardDAV_IDirectory {
}