1<?php
2
3namespace Sabre\DAVACL;
4
5use Sabre\DAV;
6use Sabre\HTTP;
7
8class MockPrincipal extends DAV\Node implements IPrincipal {
9
10    public $name;
11    public $principalUrl;
12    public $groupMembership = array();
13    public $groupMemberSet = array();
14
15    function __construct($name,$principalUrl,array $groupMembership = array(), array $groupMemberSet = array()) {
16
17        $this->name = $name;
18        $this->principalUrl = $principalUrl;
19        $this->groupMembership = $groupMembership;
20        $this->groupMemberSet = $groupMemberSet;
21
22    }
23
24    function getName() {
25
26        return $this->name;
27
28    }
29
30    function getDisplayName() {
31
32        return $this->getName();
33
34    }
35
36    function getAlternateUriSet() {
37
38        return array();
39
40    }
41
42    function getPrincipalUrl() {
43
44        return $this->principalUrl;
45
46    }
47
48    function getGroupMemberSet() {
49
50        return $this->groupMemberSet;
51
52    }
53
54    function getGroupMemberShip() {
55
56        return $this->groupMembership;
57
58    }
59
60    function setGroupMemberSet(array $groupMemberSet) {
61
62        $this->groupMemberSet = $groupMemberSet;
63
64    }
65}
66
67