ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\VObject\ITip\BrokerNewEventTest Class Reference
+ Inheritance diagram for Sabre\VObject\ITip\BrokerNewEventTest:
+ Collaboration diagram for Sabre\VObject\ITip\BrokerNewEventTest:

Public Member Functions

 testNoAttendee ()
 
 testVTODO ()
 
 testSimpleInvite ()
 
 testBrokenEventUIDMisMatch ()
 @expectedException \Sabre\VObject\ITip\ITipException More...
 
 testBrokenEventOrganizerMisMatch ()
 @expectedException \Sabre\VObject\ITip\ITipException More...
 
 testRecurrenceInvite ()
 
 testRecurrenceInvite2 ()
 
 testRecurrenceInvite3 ()
 
 testScheduleAgentClient ()
 
 testMultipleUID ()
 @expectedException Sabre\VObject\ITip\ITipException More...
 
 testChangingOrganizers ()
 @expectedException Sabre\VObject\ITip\SameOrganizerForAllComponentsException More...
 
 testNoOrganizerHasAttendee ()
 
- Public Member Functions inherited from Sabre\VObject\ITip\BrokerTester
 parse ($oldMessage, $newMessage, $expected=[], $currentUser='mailto:one @example.org')
 
 process ($input, $existingObject=null, $expected=false)
 

Detailed Description

Definition at line 5 of file BrokerNewEventTest.php.

Member Function Documentation

◆ testBrokenEventOrganizerMisMatch()

Sabre\VObject\ITip\BrokerNewEventTest::testBrokenEventOrganizerMisMatch ( )

@expectedException \Sabre\VObject\ITip\ITipException

Definition at line 113 of file BrokerNewEventTest.php.

113 {
114
115 $message = <<<ICS
116BEGIN:VCALENDAR
117VERSION:2.0
118BEGIN:VEVENT
119UID:foobar
120ORGANIZER;CN=Strunk:mailto:strunk@example.org
121ATTENDEE;CN=White:mailto:white@example.org
122END:VEVENT
123BEGIN:VEVENT
124UID:foobar
125ORGANIZER:mailto:foo@example.org
126ATTENDEE;CN=White:mailto:white@example.org
127END:VEVENT
128END:VCALENDAR
129ICS;
130
131 $this->parse(null, $message, [], 'mailto:strunk@example.org');
132
133 }
parse($oldMessage, $newMessage, $expected=[], $currentUser='mailto:one @example.org')
catch(Exception $e) $message

References $message, and Sabre\VObject\ITip\BrokerTester\parse().

+ Here is the call graph for this function:

◆ testBrokenEventUIDMisMatch()

Sabre\VObject\ITip\BrokerNewEventTest::testBrokenEventUIDMisMatch ( )

@expectedException \Sabre\VObject\ITip\ITipException

Definition at line 89 of file BrokerNewEventTest.php.

89 {
90
91 $message = <<<ICS
92BEGIN:VCALENDAR
93VERSION:2.0
94BEGIN:VEVENT
95UID:foobar
96ORGANIZER;CN=Strunk:mailto:strunk@example.org
97ATTENDEE;CN=White:mailto:white@example.org
98END:VEVENT
99BEGIN:VEVENT
100UID:foobar2
101ORGANIZER;CN=Strunk:mailto:strunk@example.org
102ATTENDEE;CN=White:mailto:white@example.org
103END:VEVENT
104END:VCALENDAR
105ICS;
106
107 $this->parse(null, $message, [], 'mailto:strunk@example.org');
108
109 }

References $message, and Sabre\VObject\ITip\BrokerTester\parse().

+ Here is the call graph for this function:

◆ testChangingOrganizers()

Sabre\VObject\ITip\BrokerNewEventTest::testChangingOrganizers ( )

@expectedException Sabre\VObject\ITip\SameOrganizerForAllComponentsException

Definition at line 501 of file BrokerNewEventTest.php.

501 {
502
503 $message = <<<ICS
504BEGIN:VCALENDAR
505VERSION:2.0
506BEGIN:VEVENT
507UID:foobar
508ORGANIZER;CN=Strunk:mailto:strunk@example.org
509ATTENDEE;CN=One:mailto:one@example.org
510ATTENDEE;CN=Two:mailto:two@example.org
511DTSTART:20140716T120000Z
512DTEND:20140716T130000Z
513RRULE:FREQ=DAILY
514END:VEVENT
515BEGIN:VEVENT
516UID:foobar
517RECURRENCE-ID:20140718T120000Z
518ORGANIZER;CN=Strunk:mailto:ew@example.org
519ATTENDEE;CN=Two:mailto:two@example.org
520ATTENDEE;CN=Three:mailto:three@example.org
521DTSTART:20140718T120000Z
522DTEND:20140718T130000Z
523END:VEVENT
524END:VCALENDAR
525ICS;
526
528 $this->parse(null, $message, [], 'mailto:strunk@example.org');
529
530 }
$version
Definition: build.php:27
const VERSION
Full version number.
Definition: Version.php:17

References $message, $version, Sabre\VObject\ITip\BrokerTester\parse(), and Sabre\VObject\Version\VERSION.

+ Here is the call graph for this function:

◆ testMultipleUID()

Sabre\VObject\ITip\BrokerNewEventTest::testMultipleUID ( )

@expectedException Sabre\VObject\ITip\ITipException

Definition at line 467 of file BrokerNewEventTest.php.

467 {
468
469 $message = <<<ICS
470BEGIN:VCALENDAR
471VERSION:2.0
472BEGIN:VEVENT
473UID:foobar
474ORGANIZER;CN=Strunk:mailto:strunk@example.org
475ATTENDEE;CN=One:mailto:one@example.org
476ATTENDEE;CN=Two:mailto:two@example.org
477DTSTART:20140716T120000Z
478DTEND:20140716T130000Z
479RRULE:FREQ=DAILY
480END:VEVENT
481BEGIN:VEVENT
482UID:foobar2
483RECURRENCE-ID:20140718T120000Z
484ORGANIZER;CN=Strunk:mailto:strunk@example.org
485ATTENDEE;CN=Two:mailto:two@example.org
486ATTENDEE;CN=Three:mailto:three@example.org
487DTSTART:20140718T120000Z
488DTEND:20140718T130000Z
489END:VEVENT
490END:VCALENDAR
491ICS;
492
494 $this->parse(null, $message, [], 'mailto:strunk@example.org');
495
496 }

References $message, $version, Sabre\VObject\ITip\BrokerTester\parse(), and Sabre\VObject\Version\VERSION.

+ Here is the call graph for this function:

◆ testNoAttendee()

Sabre\VObject\ITip\BrokerNewEventTest::testNoAttendee ( )

Definition at line 7 of file BrokerNewEventTest.php.

7 {
8
9 $message = <<<ICS
10BEGIN:VCALENDAR
11BEGIN:VEVENT
12UID:foobar
13DTSTART:20140811T220000Z
14DTEND:20140811T230000Z
15END:VEVENT
16END:VCALENDAR
17ICS;
18
19 $result = $this->parse(null, $message, []);
20
21 }
$result

References $message, $result, and Sabre\VObject\ITip\BrokerTester\parse().

+ Here is the call graph for this function:

◆ testNoOrganizerHasAttendee()

Sabre\VObject\ITip\BrokerNewEventTest::testNoOrganizerHasAttendee ( )

Definition at line 531 of file BrokerNewEventTest.php.

531 {
532
533 $message = <<<ICS
534BEGIN:VCALENDAR
535BEGIN:VEVENT
536UID:foobar
537DTSTART:20140811T220000Z
538DTEND:20140811T230000Z
539ATTENDEE;CN=Two:mailto:two@example.org
540END:VEVENT
541END:VCALENDAR
542ICS;
543
544 $this->parse(null, $message, [], 'mailto:strunk@example.org');
545
546 }

References $message, and Sabre\VObject\ITip\BrokerTester\parse().

+ Here is the call graph for this function:

◆ testRecurrenceInvite()

Sabre\VObject\ITip\BrokerNewEventTest::testRecurrenceInvite ( )

Definition at line 135 of file BrokerNewEventTest.php.

135 {
136
137 $message = <<<ICS
138BEGIN:VCALENDAR
139VERSION:2.0
140BEGIN:VEVENT
141UID:foobar
142ORGANIZER;CN=Strunk:mailto:strunk@example.org
143ATTENDEE;CN=One:mailto:one@example.org
144ATTENDEE;CN=Two:mailto:two@example.org
145DTSTART:20140716T120000Z
146DURATION:PT1H
147RRULE:FREQ=DAILY
148EXDATE:20140717T120000Z
149END:VEVENT
150BEGIN:VEVENT
151UID:foobar
152RECURRENCE-ID:20140718T120000Z
153ORGANIZER;CN=Strunk:mailto:strunk@example.org
154ATTENDEE;CN=Two:mailto:two@example.org
155ATTENDEE;CN=Three:mailto:three@example.org
156DTSTART:20140718T120000Z
157DURATION:PT1H
158END:VEVENT
159END:VCALENDAR
160ICS;
161
163
164 $expected = [
165 [
166 'uid' => 'foobar',
167 'method' => 'REQUEST',
168 'component' => 'VEVENT',
169 'sender' => 'mailto:strunk@example.org',
170 'senderName' => 'Strunk',
171 'recipient' => 'mailto:one@example.org',
172 'recipientName' => 'One',
173 'message' => <<<ICS
174BEGIN:VCALENDAR
175VERSION:2.0
176PRODID:-//Sabre//Sabre VObject $version//EN
177CALSCALE:GREGORIAN
178METHOD:REQUEST
179BEGIN:VEVENT
180UID:foobar
181ORGANIZER;CN=Strunk:mailto:strunk@example.org
182ATTENDEE;CN=One;PARTSTAT=NEEDS-ACTION:mailto:one@example.org
183ATTENDEE;CN=Two;PARTSTAT=NEEDS-ACTION:mailto:two@example.org
184DTSTART:20140716T120000Z
185DURATION:PT1H
186RRULE:FREQ=DAILY
187EXDATE:20140717T120000Z,20140718T120000Z
188END:VEVENT
189END:VCALENDAR
190ICS
191
192 ],
193 [
194 'uid' => 'foobar',
195 'method' => 'REQUEST',
196 'component' => 'VEVENT',
197 'sender' => 'mailto:strunk@example.org',
198 'senderName' => 'Strunk',
199 'recipient' => 'mailto:two@example.org',
200 'recipientName' => 'Two',
201 'message' => <<<ICS
202BEGIN:VCALENDAR
203VERSION:2.0
204PRODID:-//Sabre//Sabre VObject $version//EN
205CALSCALE:GREGORIAN
206METHOD:REQUEST
207BEGIN:VEVENT
208UID:foobar
209ORGANIZER;CN=Strunk:mailto:strunk@example.org
210ATTENDEE;CN=One;PARTSTAT=NEEDS-ACTION:mailto:one@example.org
211ATTENDEE;CN=Two;PARTSTAT=NEEDS-ACTION:mailto:two@example.org
212DTSTART:20140716T120000Z
213DURATION:PT1H
214RRULE:FREQ=DAILY
215EXDATE:20140717T120000Z
216END:VEVENT
217BEGIN:VEVENT
218UID:foobar
219RECURRENCE-ID:20140718T120000Z
220ORGANIZER;CN=Strunk:mailto:strunk@example.org
221ATTENDEE;CN=Two:mailto:two@example.org
222ATTENDEE;CN=Three:mailto:three@example.org
223DTSTART:20140718T120000Z
224DURATION:PT1H
225END:VEVENT
226END:VCALENDAR
227ICS
228
229 ],
230 [
231 'uid' => 'foobar',
232 'method' => 'REQUEST',
233 'component' => 'VEVENT',
234 'sender' => 'mailto:strunk@example.org',
235 'senderName' => 'Strunk',
236 'recipient' => 'mailto:three@example.org',
237 'recipientName' => 'Three',
238 'message' => <<<ICS
239BEGIN:VCALENDAR
240VERSION:2.0
241PRODID:-//Sabre//Sabre VObject $version//EN
242CALSCALE:GREGORIAN
243METHOD:REQUEST
244BEGIN:VEVENT
245UID:foobar
246RECURRENCE-ID:20140718T120000Z
247ORGANIZER;CN=Strunk:mailto:strunk@example.org
248ATTENDEE;CN=Two:mailto:two@example.org
249ATTENDEE;CN=Three:mailto:three@example.org
250DTSTART:20140718T120000Z
251DURATION:PT1H
252END:VEVENT
253END:VCALENDAR
254ICS
255
256 ],
257 ];
258
259 $this->parse(null, $message, $expected, 'mailto:strunk@example.org');
260
261 }

References $message, $version, Sabre\VObject\ITip\BrokerTester\parse(), and Sabre\VObject\Version\VERSION.

+ Here is the call graph for this function:

◆ testRecurrenceInvite2()

Sabre\VObject\ITip\BrokerNewEventTest::testRecurrenceInvite2 ( )

Definition at line 263 of file BrokerNewEventTest.php.

263 {
264
265 // This method tests a nearly identical path, but in this case the
266 // master event does not have an EXDATE.
267 $message = <<<ICS
268BEGIN:VCALENDAR
269VERSION:2.0
270BEGIN:VEVENT
271UID:foobar
272ORGANIZER;CN=Strunk:mailto:strunk@example.org
273ATTENDEE;CN=One:mailto:one@example.org
274ATTENDEE;CN=Two:mailto:two@example.org
275DTSTART:20140716T120000Z
276DTEND:20140716T130000Z
277RRULE:FREQ=DAILY
278END:VEVENT
279BEGIN:VEVENT
280UID:foobar
281RECURRENCE-ID:20140718T120000Z
282ORGANIZER;CN=Strunk:mailto:strunk@example.org
283ATTENDEE;CN=Two:mailto:two@example.org
284ATTENDEE;CN=Three:mailto:three@example.org
285DTSTART:20140718T120000Z
286DTEND:20140718T130000Z
287END:VEVENT
288END:VCALENDAR
289ICS;
290
292
293 $expected = [
294 [
295 'uid' => 'foobar',
296 'method' => 'REQUEST',
297 'component' => 'VEVENT',
298 'sender' => 'mailto:strunk@example.org',
299 'senderName' => 'Strunk',
300 'recipient' => 'mailto:one@example.org',
301 'recipientName' => 'One',
302 'message' => <<<ICS
303BEGIN:VCALENDAR
304VERSION:2.0
305PRODID:-//Sabre//Sabre VObject $version//EN
306CALSCALE:GREGORIAN
307METHOD:REQUEST
308BEGIN:VEVENT
309UID:foobar
310ORGANIZER;CN=Strunk:mailto:strunk@example.org
311ATTENDEE;CN=One;PARTSTAT=NEEDS-ACTION:mailto:one@example.org
312ATTENDEE;CN=Two;PARTSTAT=NEEDS-ACTION:mailto:two@example.org
313DTSTART:20140716T120000Z
314DTEND:20140716T130000Z
315RRULE:FREQ=DAILY
316EXDATE:20140718T120000Z
317END:VEVENT
318END:VCALENDAR
319ICS
320
321 ],
322 [
323 'uid' => 'foobar',
324 'method' => 'REQUEST',
325 'component' => 'VEVENT',
326 'sender' => 'mailto:strunk@example.org',
327 'senderName' => 'Strunk',
328 'recipient' => 'mailto:two@example.org',
329 'recipientName' => 'Two',
330 'message' => <<<ICS
331BEGIN:VCALENDAR
332VERSION:2.0
333PRODID:-//Sabre//Sabre VObject $version//EN
334CALSCALE:GREGORIAN
335METHOD:REQUEST
336BEGIN:VEVENT
337UID:foobar
338ORGANIZER;CN=Strunk:mailto:strunk@example.org
339ATTENDEE;CN=One;PARTSTAT=NEEDS-ACTION:mailto:one@example.org
340ATTENDEE;CN=Two;PARTSTAT=NEEDS-ACTION:mailto:two@example.org
341DTSTART:20140716T120000Z
342DTEND:20140716T130000Z
343RRULE:FREQ=DAILY
344END:VEVENT
345BEGIN:VEVENT
346UID:foobar
347RECURRENCE-ID:20140718T120000Z
348ORGANIZER;CN=Strunk:mailto:strunk@example.org
349ATTENDEE;CN=Two:mailto:two@example.org
350ATTENDEE;CN=Three:mailto:three@example.org
351DTSTART:20140718T120000Z
352DTEND:20140718T130000Z
353END:VEVENT
354END:VCALENDAR
355ICS
356
357 ],
358 [
359 'uid' => 'foobar',
360 'method' => 'REQUEST',
361 'component' => 'VEVENT',
362 'sender' => 'mailto:strunk@example.org',
363 'senderName' => 'Strunk',
364 'recipient' => 'mailto:three@example.org',
365 'recipientName' => 'Three',
366 'message' => <<<ICS
367BEGIN:VCALENDAR
368VERSION:2.0
369PRODID:-//Sabre//Sabre VObject $version//EN
370CALSCALE:GREGORIAN
371METHOD:REQUEST
372BEGIN:VEVENT
373UID:foobar
374RECURRENCE-ID:20140718T120000Z
375ORGANIZER;CN=Strunk:mailto:strunk@example.org
376ATTENDEE;CN=Two:mailto:two@example.org
377ATTENDEE;CN=Three:mailto:three@example.org
378DTSTART:20140718T120000Z
379DTEND:20140718T130000Z
380END:VEVENT
381END:VCALENDAR
382ICS
383
384 ],
385 ];
386
387 $this->parse(null, $message, $expected, 'mailto:strunk@example.org');
388
389 }

References $message, $version, Sabre\VObject\ITip\BrokerTester\parse(), and Sabre\VObject\Version\VERSION.

+ Here is the call graph for this function:

◆ testRecurrenceInvite3()

Sabre\VObject\ITip\BrokerNewEventTest::testRecurrenceInvite3 ( )

Definition at line 391 of file BrokerNewEventTest.php.

391 {
392
393 // This method tests a complex rrule
394 $message = <<<ICS
395BEGIN:VCALENDAR
396VERSION:2.0
397BEGIN:VEVENT
398UID:foobar
399ORGANIZER;CN=Strunk:mailto:strunk@example.org
400ATTENDEE;CN=One:mailto:one@example.org
401DTSTART:20140716T120000Z
402DTEND:20140716T130000Z
403RRULE:FREQ=WEEKLY;INTERVAL=2;COUNT=8;BYDAY=SA,SU
404END:VEVENT
405END:VCALENDAR
406ICS;
407
409
410 $expected = [
411 [
412 'uid' => 'foobar',
413 'method' => 'REQUEST',
414 'component' => 'VEVENT',
415 'sender' => 'mailto:strunk@example.org',
416 'senderName' => 'Strunk',
417 'recipient' => 'mailto:one@example.org',
418 'recipientName' => 'One',
419 'message' => <<<ICS
420BEGIN:VCALENDAR
421VERSION:2.0
422PRODID:-//Sabre//Sabre VObject $version//EN
423CALSCALE:GREGORIAN
424METHOD:REQUEST
425BEGIN:VEVENT
426UID:foobar
427ORGANIZER;CN=Strunk:mailto:strunk@example.org
428ATTENDEE;CN=One;PARTSTAT=NEEDS-ACTION:mailto:one@example.org
429DTSTART:20140716T120000Z
430DTEND:20140716T130000Z
431RRULE:FREQ=WEEKLY;INTERVAL=2;COUNT=8;BYDAY=SA,SU
432END:VEVENT
433END:VCALENDAR
434ICS
435
436 ],
437 ];
438
439 $this->parse(null, $message, $expected, 'mailto:strunk@example.org');
440
441 }

References $message, $version, Sabre\VObject\ITip\BrokerTester\parse(), and Sabre\VObject\Version\VERSION.

+ Here is the call graph for this function:

◆ testScheduleAgentClient()

Sabre\VObject\ITip\BrokerNewEventTest::testScheduleAgentClient ( )

Definition at line 443 of file BrokerNewEventTest.php.

443 {
444
445 $message = <<<ICS
446BEGIN:VCALENDAR
447VERSION:2.0
448BEGIN:VEVENT
449UID:foobar
450DTSTART:20140811T220000Z
451DTEND:20140811T230000Z
452ORGANIZER;CN=Strunk:mailto:strunk@example.org
453ATTENDEE;CN=White;SCHEDULE-AGENT=CLIENT:mailto:white@example.org
454END:VEVENT
455END:VCALENDAR
456ICS;
457
459
460 $this->parse(null, $message, [], 'mailto:strunk@example.org');
461
462 }

References $message, $version, Sabre\VObject\ITip\BrokerTester\parse(), and Sabre\VObject\Version\VERSION.

+ Here is the call graph for this function:

◆ testSimpleInvite()

Sabre\VObject\ITip\BrokerNewEventTest::testSimpleInvite ( )

Definition at line 37 of file BrokerNewEventTest.php.

37 {
38
39 $message = <<<ICS
40BEGIN:VCALENDAR
41VERSION:2.0
42BEGIN:VEVENT
43UID:foobar
44DTSTART:20140811T220000Z
45DTEND:20140811T230000Z
46ORGANIZER;CN=Strunk:mailto:strunk@example.org
47ATTENDEE;CN=White:mailto:white@example.org
48END:VEVENT
49END:VCALENDAR
50ICS;
51
53 $expectedMessage = <<<ICS
54BEGIN:VCALENDAR
55VERSION:2.0
56PRODID:-//Sabre//Sabre VObject $version//EN
57CALSCALE:GREGORIAN
58METHOD:REQUEST
59BEGIN:VEVENT
60UID:foobar
61DTSTART:20140811T220000Z
62DTEND:20140811T230000Z
63ORGANIZER;CN=Strunk:mailto:strunk@example.org
64ATTENDEE;CN=White;PARTSTAT=NEEDS-ACTION:mailto:white@example.org
65END:VEVENT
66END:VCALENDAR
67ICS;
68
69 $expected = [
70 [
71 'uid' => 'foobar',
72 'method' => 'REQUEST',
73 'component' => 'VEVENT',
74 'sender' => 'mailto:strunk@example.org',
75 'senderName' => 'Strunk',
76 'recipient' => 'mailto:white@example.org',
77 'recipientName' => 'White',
78 'message' => $expectedMessage,
79 ],
80 ];
81
82 $this->parse(null, $message, $expected, 'mailto:strunk@example.org');
83
84 }

References $message, $version, Sabre\VObject\ITip\BrokerTester\parse(), and Sabre\VObject\Version\VERSION.

+ Here is the call graph for this function:

◆ testVTODO()

Sabre\VObject\ITip\BrokerNewEventTest::testVTODO ( )

Definition at line 23 of file BrokerNewEventTest.php.

23 {
24
25 $message = <<<ICS
26BEGIN:VCALENDAR
27BEGIN:VTODO
28UID:foobar
29END:VTODO
30END:VCALENDAR
31ICS;
32
33 $result = $this->parse(null, $message, []);
34
35 }

References $message, $result, and Sabre\VObject\ITip\BrokerTester\parse().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: