Пример #1
0
 /**
  * @depends testBasic
  * @expectedException Sabre\DAV\Exception\MethodNotAllowed
  */
 public function testGetChildrenDisable()
 {
     $backend = new PrincipalBackend\Mock();
     $pc = new PrincipalCollection($backend);
     $pc->disableListing = true;
     $children = $pc->getChildren();
 }
Пример #2
0
 public function testFindByUri()
 {
     $backend = new PrincipalBackend\Mock();
     $pc = new PrincipalCollection($backend);
     $this->assertEquals('principals/user1', $pc->findByUri('mailto:user1.sabredav@sabredav.org'));
     $this->assertNull($pc->findByUri('mailto:fake.user.sabredav@sabredav.org'));
     $this->assertNull($pc->findByUri(''));
 }