13 {
14
16BEGIN:VCALENDAR
17VERSION:2.0
18BEGIN:VEVENT
19UID:foobar
20DTSTART:20140803T120000Z
21RRULE:FREQ=WEEKLY
22SUMMARY:Original
23END:VEVENT
24BEGIN:VEVENT
25UID:foobar
26RECURRENCE-ID:20140803T120000Z
27DTSTART:20140803T120000Z
28SUMMARY:Overridden
29END:VEVENT
30END:VCALENDAR
31ICS;
32
34 $vcal =
$vcal->expand(
new DateTime(
'2014-08-01'),
new DateTime(
'2014-09-01'));
35
36 $expected = <<<ICS
37BEGIN:VCALENDAR
38VERSION:2.0
39BEGIN:VEVENT
40UID:foobar
41RECURRENCE-ID:20140803T120000Z
42DTSTART:20140803T120000Z
43SUMMARY:Overridden
44END:VEVENT
45BEGIN:VEVENT
46UID:foobar
47DTSTART:20140810T120000Z
48SUMMARY:Original
49RECURRENCE-ID:20140810T120000Z
50END:VEVENT
51BEGIN:VEVENT
52UID:foobar
53DTSTART:20140817T120000Z
54SUMMARY:Original
55RECURRENCE-ID:20140817T120000Z
56END:VEVENT
57BEGIN:VEVENT
58UID:foobar
59DTSTART:20140824T120000Z
60SUMMARY:Original
61RECURRENCE-ID:20140824T120000Z
62END:VEVENT
63BEGIN:VEVENT
64UID:foobar
65DTSTART:20140831T120000Z
66SUMMARY:Original
67RECURRENCE-ID:20140831T120000Z
68END:VEVENT
69END:VCALENDAR
70ICS;
71
72 $this->assertVObjectEqualsVObject(
73 $expected,
75 );
76
77
78 }
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
foreach($paths as $path) if($argc< 3) $input