ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ProxyReadTest.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Sabre\CalDAV\Principal;
4 
5 use Sabre\DAVACL;
6 
8 
9  protected $backend;
10 
11  function getInstance() {
12 
14  $principal = new ProxyRead($backend, [
15  'uri' => 'principal/user',
16  ]);
17  $this->backend = $backend;
18  return $principal;
19 
20  }
21 
22  function testGetName() {
23 
24  $i = $this->getInstance();
25  $this->assertEquals('calendar-proxy-read', $i->getName());
26 
27  }
28  function testGetDisplayName() {
29 
30  $i = $this->getInstance();
31  $this->assertEquals('calendar-proxy-read', $i->getDisplayName());
32 
33  }
34 
35  function testGetLastModified() {
36 
37  $i = $this->getInstance();
38  $this->assertNull($i->getLastModified());
39 
40  }
41 
45  function testDelete() {
46 
47  $i = $this->getInstance();
48  $i->delete();
49 
50  }
51 
55  function testSetName() {
56 
57  $i = $this->getInstance();
58  $i->setName('foo');
59 
60  }
61 
63 
64  $i = $this->getInstance();
65  $this->assertEquals([], $i->getAlternateUriSet());
66 
67  }
68 
69  function testGetPrincipalUri() {
70 
71  $i = $this->getInstance();
72  $this->assertEquals('principal/user/calendar-proxy-read', $i->getPrincipalUrl());
73 
74  }
75 
76  function testGetGroupMemberSet() {
77 
78  $i = $this->getInstance();
79  $this->assertEquals([], $i->getGroupMemberSet());
80 
81  }
82 
84 
85  $i = $this->getInstance();
86  $this->assertEquals([], $i->getGroupMembership());
87 
88  }
89 
90  function testSetGroupMemberSet() {
91 
92  $i = $this->getInstance();
93  $i->setGroupMemberSet(['principals/foo']);
94 
95  $expected = [
96  $i->getPrincipalUrl() => ['principals/foo']
97  ];
98 
99  $this->assertEquals($expected, $this->backend->groupMembers);
100 
101  }
102 }
ProxyRead principal.
Definition: ProxyRead.php:19
$i
Definition: disco.tpl.php:19