Add unit test for commit 10f5a48

This commit is contained in:
Thomas Bruederli 2014-02-06 10:55:25 +01:00
parent 10f5a48531
commit 7d39a1808a
2 changed files with 36 additions and 0 deletions

View file

@ -142,6 +142,11 @@ class libvcalendar_test extends PHPUnit_Framework_TestCase
// categories, class
$this->assertEquals('libcalendaring tests', join(',', (array)$event['categories']), "Event categories");
$this->assertEquals('confidential', $event['sensitivity'], "Class/sensitivity = confidential");
// parse a reccuence chain instance
$events = $ical->import_from_file(__DIR__ . '/resources/recurrence-id.ics', 'UTF-8');
$this->assertEquals(1, count($events), "Fall back to Component::getComponents() when getBaseComponents() is empty");
$this->assertInstanceOf('DateTime', $events[0]['recurrence_date'], "Recurrence-ID as date");
}
/**

View file

@ -0,0 +1,31 @@
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Lotus Development Corporation//NONSGML Notes 8.5.3//EN_C
METHOD:REQUEST
BEGIN:VTIMEZONE
TZID:W. Europe
BEGIN:STANDARD
DTSTART:19501029T020000
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
RRULE:FREQ=YEARLY;BYMINUTE=0;BYHOUR=2;BYDAY=-1SU;BYMONTH=10
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:19500326T020000
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
RRULE:FREQ=YEARLY;BYMINUTE=0;BYHOUR=2;BYDAY=-1SU;BYMONTH=3
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
DTSTART;TZID="W. Europe":20140230T150000
DTEND;TZID="W. Europe":20140230T163000
TRANSP:OPAQUE
RDATE;TZID="W. Europe";VALUE=PERIOD:20140227T140000/20140227T153000
RECURRENCE-ID:20140227T130000Z
SEQUENCE:0
UID:7e93e8e8eef16f28aa33b78cd73613ebff
DTSTAMP:20140120T105609Z
SUMMARY:Invitation with Recurrence-ID
END:VEVENT
END:VCALENDAR