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