ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
MissingOverriddenTest.php
Go to the documentation of this file.
1<?php
2
4
5use DateTime;
6use PHPUnit\Framework\TestCase;
8
9class MissingOverriddenTest extends TestCase {
10
11 use \Sabre\VObject\PHPUnitAssertions;
12
13 function testExpand() {
14
15 $input = <<<ICS
16BEGIN:VCALENDAR
17VERSION:2.0
18BEGIN:VEVENT
19UID:foo
20DTSTART:20130727T120000Z
21DURATION:PT1H
22RRULE:FREQ=DAILY;COUNT=2
23SUMMARY:A
24END:VEVENT
25BEGIN:VEVENT
26RECURRENCE-ID:20130728T120000Z
27UID:foo
28DTSTART:20140101T120000Z
29DURATION:PT1H
30SUMMARY:B
31END:VEVENT
32END:VCALENDAR
33ICS;
34
36 $this->assertInstanceOf('Sabre\\VObject\\Component\\VCalendar', $vcal);
37
38 $vcal = $vcal->expand(new DateTime('2011-01-01'), new DateTime('2015-01-01'));
39
40 $output = <<<ICS
41BEGIN:VCALENDAR
42VERSION:2.0
43BEGIN:VEVENT
44UID:foo
45DTSTART:20130727T120000Z
46DURATION:PT1H
47SUMMARY:A
48RECURRENCE-ID:20130727T120000Z
49END:VEVENT
50BEGIN:VEVENT
51RECURRENCE-ID:20130728T120000Z
52UID:foo
53DTSTART:20140101T120000Z
54DURATION:PT1H
55SUMMARY:B
56END:VEVENT
57END:VCALENDAR
58ICS;
59 $this->assertVObjectEqualsVObject($output, $vcal);
60
61 }
62
63}
An exception for terminatinating execution or to throw for unit testing.
iCalendar/vCard/jCal/jCard/xCal/xCard reader object.
Definition: Reader.php:15
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
Definition: Reader.php:42
foreach($paths as $path) if($argc< 3) $input