ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
BrokerProcessMessageTest.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
Sabre\VObject\ITip
;
4
5
class
BrokerProcessMessageTest
extends
BrokerTester
{
6
7
function
testRequestNew
() {
8
9
$itip = <<<ICS
10
BEGIN:VCALENDAR
11
VERSION:2.0
12
METHOD:REQUEST
13
BEGIN:VEVENT
14
SEQUENCE:1
15
UID:foobar
16
END:VEVENT
17
END:VCALENDAR
18
ICS;
19
20
$expected = <<<ICS
21
BEGIN:VCALENDAR
22
VERSION:2.0
23
BEGIN:VEVENT
24
SEQUENCE:1
25
UID:foobar
26
END:VEVENT
27
END:VCALENDAR
28
ICS;
29
30
$result
= $this->
process
($itip, null, $expected);
31
32
}
33
34
function
testRequestUpdate
() {
35
36
$itip = <<<ICS
37
BEGIN:VCALENDAR
38
VERSION:2.0
39
METHOD:REQUEST
40
BEGIN:VEVENT
41
SEQUENCE:2
42
UID:foobar
43
END:VEVENT
44
END:VCALENDAR
45
ICS;
46
47
$old = <<<ICS
48
BEGIN:VCALENDAR
49
BEGIN:VEVENT
50
SEQUENCE:1
51
UID:foobar
52
END:VEVENT
53
END:VCALENDAR
54
ICS;
55
56
$expected = <<<ICS
57
BEGIN:VCALENDAR
58
BEGIN:VEVENT
59
SEQUENCE:2
60
UID:foobar
61
END:VEVENT
62
END:VCALENDAR
63
ICS;
64
65
$result
= $this->
process
($itip, $old, $expected);
66
67
}
68
69
function
testCancel
() {
70
71
$itip = <<<ICS
72
BEGIN:VCALENDAR
73
VERSION:2.0
74
METHOD:CANCEL
75
BEGIN:VEVENT
76
SEQUENCE:2
77
UID:foobar
78
END:VEVENT
79
END:VCALENDAR
80
ICS;
81
82
$old = <<<ICS
83
BEGIN:VCALENDAR
84
BEGIN:VEVENT
85
SEQUENCE:1
86
UID:foobar
87
END:VEVENT
88
END:VCALENDAR
89
ICS;
90
91
$expected = <<<ICS
92
BEGIN:VCALENDAR
93
BEGIN:VEVENT
94
UID:foobar
95
STATUS:CANCELLED
96
SEQUENCE:2
97
END:VEVENT
98
END:VCALENDAR
99
ICS;
100
101
$result
= $this->
process
($itip, $old, $expected);
102
103
}
104
105
function
testCancelNoExistingEvent
() {
106
107
$itip = <<<ICS
108
BEGIN:VCALENDAR
109
VERSION:2.0
110
METHOD:CANCEL
111
BEGIN:VEVENT
112
SEQUENCE:2
113
UID:foobar
114
END:VEVENT
115
END:VCALENDAR
116
ICS;
117
118
$old = null;
119
$expected = null;
120
121
$result
= $this->
process
($itip, $old, $expected);
122
123
}
124
125
function
testUnsupportedComponent
() {
126
127
$itip = <<<ICS
128
BEGIN:VCALENDAR
129
VERSION:2.0
130
BEGIN:VTODO
131
SEQUENCE:2
132
UID:foobar
133
END:VTODO
134
END:VCALENDAR
135
ICS;
136
137
$old = null;
138
$expected = null;
139
140
$result
= $this->
process
($itip, $old, $expected);
141
142
}
143
144
function
testUnsupportedMethod
() {
145
146
$itip = <<<ICS
147
BEGIN:VCALENDAR
148
VERSION:2.0
149
METHOD:PUBLISH
150
BEGIN:VEVENT
151
SEQUENCE:2
152
UID:foobar
153
END:VEVENT
154
END:VCALENDAR
155
ICS;
156
157
$old = null;
158
$expected = null;
159
160
$result
= $this->
process
($itip, $old, $expected);
161
162
}
163
164
}
$result
$result
Definition:
CleanUpTest.php:463
Sabre\VObject\ITip\BrokerTester\process
process($input, $existingObject=null, $expected=false)
Definition:
BrokerTester.php:47
Sabre\VObject\ITip\BrokerProcessMessageTest\testCancel
testCancel()
Definition:
BrokerProcessMessageTest.php:69
Sabre\VObject\ITip\BrokerProcessMessageTest\testRequestNew
testRequestNew()
Definition:
BrokerProcessMessageTest.php:7
Sabre\VObject\ITip\BrokerProcessMessageTest\testRequestUpdate
testRequestUpdate()
Definition:
BrokerProcessMessageTest.php:34
Sabre\VObject\ITip\BrokerProcessMessageTest
Definition:
BrokerProcessMessageTest.php:5
Sabre\VObject\ITip\BrokerProcessMessageTest\testCancelNoExistingEvent
testCancelNoExistingEvent()
Definition:
BrokerProcessMessageTest.php:105
Sabre\VObject\ITip\BrokerProcessMessageTest\testUnsupportedComponent
testUnsupportedComponent()
Definition:
BrokerProcessMessageTest.php:125
Sabre\VObject\ITip\BrokerProcessMessageTest\testUnsupportedMethod
testUnsupportedMethod()
Definition:
BrokerProcessMessageTest.php:144
php
Sabre\VObject\ITip\BrokerTester
Utilities for testing the broker.
Definition:
BrokerTester.php:15
Sabre\VObject\ITip
Definition:
Broker.php:3
libs
composer
vendor
sabre
vobject
tests
VObject
ITip
BrokerProcessMessageTest.php
Generated on Thu Jan 16 2025 19:01:53 for ILIAS by
1.8.13 (using
Doxyfile
)