mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-05 16:22:54 +00:00
28 lines
749 B
PHP
28 lines
749 B
PHP
|
<?php
|
||
|
|
||
|
class Sabre_CalDAV_Notifications_CollectionTest extends \PHPUnit_Framework_TestCase {
|
||
|
|
||
|
function testGetChildren() {
|
||
|
|
||
|
$principalUri = 'principals/user1';
|
||
|
|
||
|
$systemStatus = new Sabre_CalDAV_Notifications_Notification_SystemStatus(1);
|
||
|
|
||
|
$caldavBackend = new Sabre_CalDAV_Backend_Mock(array(),array(), array(
|
||
|
'principals/user1' => array(
|
||
|
$systemStatus
|
||
|
)
|
||
|
));
|
||
|
|
||
|
|
||
|
$col = new Sabre_CalDAV_Notifications_Collection($caldavBackend, $principalUri);
|
||
|
$this->assertEquals('notifications', $col->getName());
|
||
|
|
||
|
$this->assertEquals(array(
|
||
|
new Sabre_CalDAV_Notifications_Node($caldavBackend, $systemStatus)
|
||
|
), $col->getChildren());
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|