/** * @depends testBasic * @expectedException Sabre\DAV\Exception\MethodNotAllowed */ public function testGetChildrenDisable() { $backend = new PrincipalBackend\Mock(); $pc = new PrincipalCollection($backend); $pc->disableListing = true; $children = $pc->getChildren(); }
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('')); }