]> git.mxchange.org Git - friendica-addons.git/blobdiff - dav/SabreDAV/tests/Sabre/DAVACL/Property/ACLRestrictionsTest.php
Initial Release of the calendar plugin
[friendica-addons.git] / dav / SabreDAV / tests / Sabre / DAVACL / Property / ACLRestrictionsTest.php
diff --git a/dav/SabreDAV/tests/Sabre/DAVACL/Property/ACLRestrictionsTest.php b/dav/SabreDAV/tests/Sabre/DAVACL/Property/ACLRestrictionsTest.php
new file mode 100644 (file)
index 0000000..921052b
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+
+class Sabre_DAVACL_Property_ACLRestrictionsTest extends PHPUnit_Framework_TestCase {
+
+    function testConstruct() {
+
+        $prop = new Sabre_DAVACL_Property_AclRestrictions();
+
+    }
+
+    function testSerializeEmpty() {
+
+        $dom = new DOMDocument('1.0');
+        $root = $dom->createElementNS('DAV:','d:root');
+
+        $dom->appendChild($root);
+
+        $acl = new Sabre_DAVACL_Property_AclRestrictions();
+        $acl->serialize(new Sabre_DAV_Server(), $root);
+
+        $xml = $dom->saveXML();
+        $expected = '<?xml version="1.0"?>
+<d:root xmlns:d="DAV:"><d:grant-only/><d:no-invert/></d:root>
+';
+        $this->assertEquals($expected, $xml);
+
+    }
+
+
+}