8use PHPUnit\Framework\TestCase;
22UID:2CD5887F7CF4600F7A3B1F8065099E40-240BDA7121B61224
23DTSTAMP;VALUE=DATE-TIME:20151014T110604Z
24CREATED;VALUE=DATE-TIME:20151014T110245Z
25LAST-MODIFIED;VALUE=DATE-TIME:20151014T110541Z
26DTSTART;VALUE=DATE-TIME;TZID=Europe/Berlin:20151012T020000
27DTEND;VALUE=DATE-TIME;TZID=Europe/Berlin:20151012T013000
30RDATE;VALUE=DATE-TIME;TZID=Europe/Berlin:20151015T020000,20151017T020000,20
31 151018T020000,20151020T020000
39 $this->assertInstanceOf(
'Sabre\\VObject\\Component\\VCalendar',
$vcal);
41 $vcal =
$vcal->expand(
new DateTime(
'2015-01-01'),
new DateTime(
'2015-12-01'));
45 $this->assertEquals(5, count(
$result));
47 $utc =
new DateTimeZone(
'UTC');
49 new DateTimeImmutable(
"2015-10-12", $utc),
50 new DateTimeImmutable(
"2015-10-15", $utc),
51 new DateTimeImmutable(
"2015-10-17", $utc),
52 new DateTimeImmutable(
"2015-10-18", $utc),
53 new DateTimeImmutable(
"2015-10-20", $utc),
56 $result = array_map(
function($ev) {
return $ev->DTSTART->getDateTime();},
$result);
57 $this->assertEquals($expected,
$result);
An exception for terminatinating execution or to throw for unit testing.
iCalendar/vCard/jCal/jCard/xCal/xCard reader object.
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
This is a unittest for Issue #53.
foreach($paths as $path) if($argc< 3) $input