xref: /plugin/davcal/vendor/sabre/dav/tests/Sabre/CalDAV/Principal/CollectionTest.php (revision a1a3b6794e0e143a4a8b51d3185ce2d339be61ab)
1*a1a3b679SAndreas Boehler<?php
2*a1a3b679SAndreas Boehler
3*a1a3b679SAndreas Boehlernamespace Sabre\CalDAV\Principal;
4*a1a3b679SAndreas Boehleruse Sabre\DAVACL;
5*a1a3b679SAndreas Boehler
6*a1a3b679SAndreas Boehlerclass CollectionTest extends \PHPUnit_Framework_TestCase {
7*a1a3b679SAndreas Boehler
8*a1a3b679SAndreas Boehler    function testGetChildForPrincipal() {
9*a1a3b679SAndreas Boehler
10*a1a3b679SAndreas Boehler        $back = new DAVACL\PrincipalBackend\Mock();
11*a1a3b679SAndreas Boehler        $col = new Collection($back);
12*a1a3b679SAndreas Boehler        $r = $col->getChildForPrincipal(array(
13*a1a3b679SAndreas Boehler            'uri' => 'principals/admin',
14*a1a3b679SAndreas Boehler        ));
15*a1a3b679SAndreas Boehler        $this->assertInstanceOf('Sabre\\CalDAV\\Principal\\User', $r);
16*a1a3b679SAndreas Boehler
17*a1a3b679SAndreas Boehler    }
18*a1a3b679SAndreas Boehler
19*a1a3b679SAndreas Boehler}
20