mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-07 17:08:48 +00:00
Initial Release of the calendar plugin
This commit is contained in:
parent
45cc9885fc
commit
7115197a33
561 changed files with 189494 additions and 0 deletions
48
dav/SabreDAV/tests/Sabre/DAVACL/PrincipalCollectionTest.php
Normal file
48
dav/SabreDAV/tests/Sabre/DAVACL/PrincipalCollectionTest.php
Normal file
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
require_once 'Sabre/DAVACL/MockPrincipalBackend.php';
|
||||
|
||||
class Sabre_DAVACL_PrincipalCollectionTest extends PHPUnit_Framework_TestCase {
|
||||
|
||||
public function testBasic() {
|
||||
|
||||
$backend = new Sabre_DAVACL_MockPrincipalBackend();
|
||||
$pc = new Sabre_DAVACL_PrincipalCollection($backend);
|
||||
$this->assertTrue($pc instanceof Sabre_DAVACL_PrincipalCollection);
|
||||
|
||||
$this->assertEquals('principals',$pc->getName());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testBasic
|
||||
*/
|
||||
public function testGetChildren() {
|
||||
|
||||
$backend = new Sabre_DAVACL_MockPrincipalBackend();
|
||||
$pc = new Sabre_DAVACL_PrincipalCollection($backend);
|
||||
|
||||
$children = $pc->getChildren();
|
||||
$this->assertTrue(is_array($children));
|
||||
|
||||
foreach($children as $child) {
|
||||
$this->assertTrue($child instanceof Sabre_DAVACL_IPrincipal);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testBasic
|
||||
* @expectedException Sabre_DAV_Exception_MethodNotAllowed
|
||||
*/
|
||||
public function testGetChildrenDisable() {
|
||||
|
||||
$backend = new Sabre_DAVACL_MockPrincipalBackend();
|
||||
$pc = new Sabre_DAVACL_PrincipalCollection($backend);
|
||||
$pc->disableListing = true;
|
||||
|
||||
$children = $pc->getChildren();
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue