aboutsummaryrefslogblamecommitdiffstats
path: root/vendor/sabre/dav/tests/Sabre/CardDAV/IDirectoryTest.php
blob: 760749f6cdaef3b90b0e9619dd5100dfe30e9436 (plain) (tree)
1
2
3
4
5
6
7
8

     

                        



                        



                                                        
                 
                                           
          




                                        
                                                                             
                                                                                                 
     

 

                                                                      
 
<?php

declare(strict_types=1);

namespace Sabre\CardDAV;

use Sabre\DAV;

class IDirectoryTest extends \PHPUnit\Framework\TestCase
{
    public function testResourceType()
    {
        $tree = [
            new DirectoryMock('directory'),
        ];

        $server = new DAV\Server($tree);
        $plugin = new Plugin();
        $server->addPlugin($plugin);

        $props = $server->getProperties('directory', ['{DAV:}resourcetype']);
        $this->assertTrue($props['{DAV:}resourcetype']->is('{'.Plugin::NS_CARDDAV.'}directory'));
    }
}

class DirectoryMock extends DAV\SimpleCollection implements IDirectory
{
}