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

Public Member Functions

 testExpand ()
 

Detailed Description

Definition at line 9 of file Issue50Test.php.

Member Function Documentation

◆ testExpand()

Sabre\VObject\Issue50Test::testExpand ( )

Definition at line 11 of file Issue50Test.php.

References Sabre\VObject\$input, $result, $tz, $vcal, and Sabre\VObject\Reader\read().

11  {
12 
13  $input = <<<ICS
14 BEGIN:VCALENDAR
15 VERSION:2.0
16 PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
17 BEGIN:VTIMEZONE
18 TZID:Europe/Brussels
19 X-LIC-LOCATION:Europe/Brussels
20 BEGIN:DAYLIGHT
21 TZOFFSETFROM:+0100
22 TZOFFSETTO:+0200
23 TZNAME:CEST
24 DTSTART:19700329T020000
25 RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
26 END:DAYLIGHT
27 BEGIN:STANDARD
28 TZOFFSETFROM:+0200
29 TZOFFSETTO:+0100
30 TZNAME:CET
31 DTSTART:19701025T030000
32 RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
33 END:STANDARD
34 END:VTIMEZONE
35 BEGIN:VEVENT
36 CREATED:20130705T142510Z
37 LAST-MODIFIED:20130715T132556Z
38 DTSTAMP:20130715T132556Z
39 UID:1aef0b27-3d92-4581-829a-11999dd36724
40 SUMMARY:Werken
41 RRULE:FREQ=DAILY;COUNT=5
42 DTSTART;TZID=Europe/Brussels:20130715T090000
43 DTEND;TZID=Europe/Brussels:20130715T170000
44 LOCATION:Job
45 DESCRIPTION:Vrij
46 X-MOZ-GENERATION:9
47 END:VEVENT
48 BEGIN:VEVENT
49 CREATED:20130715T081654Z
50 LAST-MODIFIED:20130715T110931Z
51 DTSTAMP:20130715T110931Z
52 UID:1aef0b27-3d92-4581-829a-11999dd36724
53 SUMMARY:Werken
54 RECURRENCE-ID;TZID=Europe/Brussels:20130719T090000
55 DTSTART;TZID=Europe/Brussels:20130719T070000
56 DTEND;TZID=Europe/Brussels:20130719T150000
57 SEQUENCE:1
58 LOCATION:Job
59 DESCRIPTION:Vrij
60 X-MOZ-GENERATION:1
61 END:VEVENT
62 BEGIN:VEVENT
63 CREATED:20130715T111654Z
64 LAST-MODIFIED:20130715T132556Z
65 DTSTAMP:20130715T132556Z
66 UID:1aef0b27-3d92-4581-829a-11999dd36724
67 SUMMARY:Werken
68 RECURRENCE-ID;TZID=Europe/Brussels:20130716T090000
69 DTSTART;TZID=Europe/Brussels:20130716T070000
70 DTEND;TZID=Europe/Brussels:20130716T150000
71 SEQUENCE:1
72 LOCATION:Job
73 X-MOZ-GENERATION:2
74 END:VEVENT
75 BEGIN:VEVENT
76 CREATED:20130715T125942Z
77 LAST-MODIFIED:20130715T130023Z
78 DTSTAMP:20130715T130023Z
79 UID:1aef0b27-3d92-4581-829a-11999dd36724
80 SUMMARY:Werken
81 RECURRENCE-ID;TZID=Europe/Brussels:20130717T090000
82 DTSTART;TZID=Europe/Brussels:20130717T070000
83 DTEND;TZID=Europe/Brussels:20130717T150000
84 SEQUENCE:1
85 LOCATION:Job
86 X-MOZ-GENERATION:3
87 END:VEVENT
88 BEGIN:VEVENT
89 CREATED:20130715T130024Z
90 LAST-MODIFIED:20130715T130034Z
91 DTSTAMP:20130715T130034Z
92 UID:1aef0b27-3d92-4581-829a-11999dd36724
93 SUMMARY:Werken
94 RECURRENCE-ID;TZID=Europe/Brussels:20130718T090000
95 DTSTART;TZID=Europe/Brussels:20130718T090000
96 DTEND;TZID=Europe/Brussels:20130718T170000
97 LOCATION:Job
98 X-MOZ-GENERATION:5
99 DESCRIPTION:Vrij
100 END:VEVENT
101 END:VCALENDAR
102 ICS;
103 
105  $this->assertInstanceOf('Sabre\\VObject\\Component\\VCalendar', $vcal);
106 
107  $it = new Recur\EventIterator($vcal, '1aef0b27-3d92-4581-829a-11999dd36724');
108 
109  $result = [];
110  foreach ($it as $instance) {
111 
112  $result[] = $instance;
113 
114  }
115 
116  $tz = new DateTimeZone('Europe/Brussels');
117 
118  $this->assertEquals([
119  new DateTimeImmutable('2013-07-15 09:00:00', $tz),
120  new DateTimeImmutable('2013-07-16 07:00:00', $tz),
121  new DateTimeImmutable('2013-07-17 07:00:00', $tz),
122  new DateTimeImmutable('2013-07-18 09:00:00', $tz),
123  new DateTimeImmutable('2013-07-19 07:00:00', $tz),
124  ], $result);
125 
126  }
$result
if($argc< 3) $input
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
Definition: Reader.php:42
+ Here is the call graph for this function:

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