streams/vendor/sabre/dav/tests/Sabre/CardDAV/IDirectoryTest.php

31 lines
597 B
PHP
Raw Normal View History

<?php
namespace Sabre\CardDAV;
use Sabre\DAV;
class IDirectoryTest extends \PHPUnit_Framework_TestCase {
function testResourceType() {
2016-05-28 15:46:24 +00:00
$tree = [
new DirectoryMock('directory')
2016-05-28 15:46:24 +00:00
];
$server = new DAV\Server($tree);
$plugin = new Plugin();
$server->addPlugin($plugin);
2016-05-28 15:46:24 +00:00
$props = $server->getProperties('directory', ['{DAV:}resourcetype']);
$this->assertTrue($props['{DAV:}resourcetype']->is('{' . Plugin::NS_CARDDAV . '}directory'));
}
}
class DirectoryMock extends DAV\SimpleCollection implements IDirectory {
}