ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
ProxyReadTest.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
Sabre\CalDAV\Principal
;
4
5
use
Sabre\DAVACL
;
6
7
class
ProxyReadTest
extends
\PHPUnit_Framework_TestCase
{
8
9
protected
$backend
;
10
11
function
getInstance
() {
12
13
$backend
=
new
DAVACL\PrincipalBackend\Mock
();
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
62
function
testGetAlternateUriSet
() {
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
83
function
testGetGroupMembership
() {
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
}
Sabre\CalDAV\Principal\ProxyReadTest\testDelete
testDelete()
Sabre
Definition:
ProxyReadTest.php:45
Sabre\CalDAV\Principal\ProxyReadTest\testSetName
testSetName()
Sabre
Definition:
ProxyReadTest.php:55
Sabre\CalDAV\Principal\ProxyReadTest\testGetLastModified
testGetLastModified()
Definition:
ProxyReadTest.php:35
Sabre\CalDAV\Principal
Definition:
Collection.php:3
Sabre\CalDAV\Principal\ProxyReadTest\testGetDisplayName
testGetDisplayName()
Definition:
ProxyReadTest.php:28
PHPUnit_Framework_TestCase
Sabre\CalDAV\Principal\ProxyReadTest\testGetName
testGetName()
Definition:
ProxyReadTest.php:22
Sabre\CalDAV\Principal\ProxyReadTest\testGetGroupMembership
testGetGroupMembership()
Definition:
ProxyReadTest.php:83
Sabre\DAVACL\PrincipalBackend\Mock
Definition:
Mock.php:5
Sabre\CalDAV\Principal\ProxyReadTest\testGetGroupMemberSet
testGetGroupMemberSet()
Definition:
ProxyReadTest.php:76
Sabre\CalDAV\Principal\ProxyReadTest\getInstance
getInstance()
Definition:
ProxyReadTest.php:11
Sabre\CalDAV\Principal\ProxyReadTest\testSetGroupMemberSet
testSetGroupMemberSet()
Definition:
ProxyReadTest.php:90
Sabre\CalDAV\Principal\ProxyReadTest
Definition:
ProxyReadTest.php:7
Sabre\CalDAV\Principal\ProxyReadTest\$backend
$backend
Definition:
ProxyReadTest.php:9
Sabre\CalDAV\Principal\ProxyReadTest\testGetAlternateUriSet
testGetAlternateUriSet()
Definition:
ProxyReadTest.php:62
Sabre\DAVACL
Definition:
AbstractPrincipalCollection.php:3
Sabre\CalDAV\Principal\ProxyRead
ProxyRead principal.
Definition:
ProxyRead.php:19
$i
$i
Definition:
disco.tpl.php:19
php
Sabre\CalDAV\Principal\ProxyReadTest\testGetPrincipalUri
testGetPrincipalUri()
Definition:
ProxyReadTest.php:69
libs
composer
vendor
sabre
dav
tests
Sabre
CalDAV
Principal
ProxyReadTest.php
Generated on Thu Jan 30 2025 19:01:28 for ILIAS by
1.8.13 (using
Doxyfile
)