]> git.mxchange.org Git - friendica-addons.git/blobdiff - dav/SabreDAV/tests/Sabre/DAVACL/MockPrincipal.php
Initial Release of the calendar plugin
[friendica-addons.git] / dav / SabreDAV / tests / Sabre / DAVACL / MockPrincipal.php
diff --git a/dav/SabreDAV/tests/Sabre/DAVACL/MockPrincipal.php b/dav/SabreDAV/tests/Sabre/DAVACL/MockPrincipal.php
new file mode 100644 (file)
index 0000000..1ea2de3
--- /dev/null
@@ -0,0 +1,61 @@
+<?php
+
+class Sabre_DAVACL_MockPrincipal extends Sabre_DAV_Node implements Sabre_DAVACL_IPrincipal {
+
+    public $name;
+    public $principalUrl;
+    public $groupMembership = array();
+    public $groupMemberSet = array();
+
+    function __construct($name,$principalUrl,array $groupMembership = array(), array $groupMemberSet = array()) {
+
+        $this->name = $name;
+        $this->principalUrl = $principalUrl;
+        $this->groupMembership = $groupMembership;
+        $this->groupMemberSet = $groupMemberSet;
+
+    }
+
+    function getName() {
+
+        return $this->name;
+
+    }
+
+    function getDisplayName() {
+
+        return $this->getName();
+
+    }
+
+    function getAlternateUriSet() {
+
+        return array();
+
+    }
+
+    function getPrincipalUrl() {
+
+        return $this->principalUrl;
+
+    }
+
+    function getGroupMemberSet() {
+
+        return $this->groupMemberSet;
+
+    }
+
+    function getGroupMemberShip() {
+
+        return $this->groupMembership;
+
+    }
+
+    function setGroupMemberSet(array $groupMemberSet) {
+
+        $this->groupMemberSet = $groupMemberSet;
+
+    }
+}
+