]> git.mxchange.org Git - friendica-addons.git/blobdiff - dav/SabreDAV/tests/Sabre/CalDAV/Notifications/CollectionTest.php
Heavily refactored, including multiple calendars per user and recurring events. Not...
[friendica-addons.git] / dav / SabreDAV / tests / Sabre / CalDAV / Notifications / CollectionTest.php
diff --git a/dav/SabreDAV/tests/Sabre/CalDAV/Notifications/CollectionTest.php b/dav/SabreDAV/tests/Sabre/CalDAV/Notifications/CollectionTest.php
new file mode 100644 (file)
index 0000000..1d396d6
--- /dev/null
@@ -0,0 +1,27 @@
+<?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()); 
+
+    }
+
+}