Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F1820189
Issue48Test.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Size
1 KB
Subscribers
None
Issue48Test.php
View Options
<?php
namespace
Sabre\VObject
;
use
DateTime
,
DateTimeZone
;
class
Issue48Test
extends
\PHPUnit_Framework_TestCase
{
function
testExpand
()
{
$input
=
<<<ICS
BEGIN:VCALENDAR
BEGIN:VEVENT
UID:foo
DTEND;TZID=Europe/Moscow:20130710T120000
DTSTART;TZID=Europe/Moscow:20130710T110000
RRULE:FREQ=DAILY;UNTIL=20130712T195959Z
END:VEVENT
BEGIN:VEVENT
UID:foo
DTEND;TZID=Europe/Moscow:20130713T120000
DTSTART;TZID=Europe/Moscow:20130713T110000
RECURRENCE-ID;TZID=Europe/Moscow:20130711T110000
END:VEVENT
END:VCALENDAR
ICS;
$vcal
=
Reader
::
read
(
$input
);
$this
->
assertInstanceOf
(
'Sabre
\\
VObject
\\
Component
\\
VCalendar'
,
$vcal
);
$it
=
new
Recur\EventIterator
(
$vcal
,
'foo'
);
$result
=
iterator_to_array
(
$it
);
$tz
=
new
DateTimeZone
(
'Europe/Moscow'
);
$expected
=
array
(
new
DateTime
(
'2013-07-10 11:00:00'
,
$tz
),
new
DateTime
(
'2013-07-12 11:00:00'
,
$tz
),
new
DateTime
(
'2013-07-13 11:00:00'
,
$tz
),
);
$this
->
assertEquals
(
$expected
,
$result
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Dec 21, 9:44 PM (2 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
916869
Default Alt Text
Issue48Test.php (1 KB)
Attached To
rDAVCAL DokuWiki DAVCal PlugIn
Event Timeline
Log In to Comment