ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
BrokerSignificantChangesTest.php
Go to the documentation of this file.
1<?php
2
3namespace Sabre\VObject\ITip;
4
6
11
12 $old = <<<ICS
13BEGIN:VCALENDAR
14VERSION:2.0
15CALSCALE:GREGORIAN
16PRODID:-//Ximian//NONSGML Evolution Calendar//EN
17BEGIN:VEVENT
18UID:20140813T153116Z-12176-1000-1065-6@johnny-lubuntu
19DTSTAMP:20140813T142829Z
20DTSTART;TZID=America/Toronto:20140815T110000
21SEQUENCE:2
22SUMMARY:Evo makes a Meeting
23LOCATION:fruux HQ
24CLASS:PUBLIC
25RRULE:FREQ=WEEKLY
26ORGANIZER:MAILTO:martin@fruux.com
27ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=
28 TRUE;LANGUAGE=en:MAILTO:dominik@fruux.com
29CREATED:20140813T153211Z
30LAST-MODIFIED:20140813T155353Z
31END:VEVENT
32END:VCALENDAR
33ICS;
34
35 $new = $old;
36 $expected = [['significantChange' => false, ]];
37
38 $this->parse($old, $new, $expected, 'mailto:martin@fruux.com');
39 }
40
45
46 $old = <<<ICS
47BEGIN:VCALENDAR
48VERSION:2.0
49CALSCALE:GREGORIAN
50PRODID:-//Ximian//NONSGML Evolution Calendar//EN
51BEGIN:VEVENT
52UID:20140813T153116Z-12176-1000-1065-6@johnny-lubuntu
53DTSTAMP:20140813T142829Z
54DTSTART;TZID=America/Toronto:20140815T110000
55SEQUENCE:2
56SUMMARY:Evo makes a Meeting
57LOCATION:fruux HQ
58CLASS:PUBLIC
59RRULE:FREQ=WEEKLY
60ORGANIZER:MAILTO:martin@fruux.com
61ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=
62 TRUE;LANGUAGE=en:MAILTO:dominik@fruux.com
63CREATED:20140813T153211Z
64LAST-MODIFIED:20140813T155353Z
65END:VEVENT
66END:VCALENDAR
67ICS;
68
69 $new = str_replace('FREQ=WEEKLY', 'FREQ=WEEKLY;INTERVAL=1', $old);
70 $expected = [['significantChange' => false, ]];
71
72 $this->parse($old, $new, $expected, 'mailto:martin@fruux.com');
73 }
74
75
80
81 $old = <<<ICS
82BEGIN:VCALENDAR
83VERSION:2.0
84CALSCALE:GREGORIAN
85PRODID:-//Ximian//NONSGML Evolution Calendar//EN
86BEGIN:VEVENT
87UID:20140813T153116Z-12176-1000-1065-6@johnny-lubuntu
88DTSTAMP:20140813T142829Z
89DTSTART;TZID=America/Toronto:20140815T110000
90SEQUENCE:2
91SUMMARY:Evo makes a Meeting
92LOCATION:fruux HQ
93CLASS:PUBLIC
94RRULE:FREQ=WEEKLY;BYDAY=MO
95ORGANIZER:MAILTO:martin@fruux.com
96ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=
97 TRUE;LANGUAGE=en:MAILTO:dominik@fruux.com
98CREATED:20140813T153211Z
99LAST-MODIFIED:20140813T155353Z
100END:VEVENT
101END:VCALENDAR
102ICS;
103
104 $new = str_replace('FREQ=WEEKLY;BYDAY=MO', 'BYDAY=MO;FREQ=WEEKLY', $old);
105 $expected = [['significantChange' => false, ]];
106
107 $this->parse($old, $new, $expected, 'mailto:martin@fruux.com');
108 }
109
110}
An exception for terminatinating execution or to throw for unit testing.
testSignificantChangesRRuleNoChange()
Check significant changes detection (no change)
testSignificantChangesNoChange()
Check significant changes detection (no change)
testSignificantChangesRRuleOrderNoChange()
Check significant changes detection (no change)
Utilities for testing the broker.
parse($oldMessage, $newMessage, $expected=[], $currentUser='mailto:one @example.org')