Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F1841956
MissingOverriddenTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Size
1 KB
Subscribers
None
MissingOverriddenTest.php
View Options
<?php
namespace
Sabre\VObject
;
use
DateTime
,
DateTimeZone
;
class
RecurrenceIteratorMissingOverriddenTest
extends
\PHPUnit_Framework_TestCase
{
function
testExpand
()
{
$input
=
<<<ICS
BEGIN:VCALENDAR
VERSION:2.0
BEGIN:VEVENT
UID:foo
DTSTART:20130727T120000Z
DURATION:PT1H
RRULE:FREQ=DAILY;COUNT=2
SUMMARY:A
END:VEVENT
BEGIN:VEVENT
RECURRENCE-ID:20130728T120000Z
UID:foo
DTSTART:20140101T120000Z
DURATION:PT1H
SUMMARY:B
END:VEVENT
END:VCALENDAR
ICS;
$vcal
=
Reader
::
read
(
$input
);
$this
->
assertInstanceOf
(
'Sabre
\\
VObject
\\
Component
\\
VCalendar'
,
$vcal
);
$vcal
->
expand
(
new
DateTime
(
'2011-01-01'
),
new
DateTime
(
'2015-01-01'
));
$result
=
$vcal
->
serialize
();
$output
=
<<<ICS
BEGIN:VCALENDAR
VERSION:2.0
BEGIN:VEVENT
UID:foo
DTSTART:20130727T120000Z
DURATION:PT1H
SUMMARY:A
END:VEVENT
BEGIN:VEVENT
RECURRENCE-ID:20130728T120000Z
UID:foo
DTSTART:20140101T120000Z
DURATION:PT1H
SUMMARY:B
END:VEVENT
END:VCALENDAR
ICS;
$this
->
assertEquals
(
$output
,
str_replace
(
"
\r
"
,
""
,
$result
));
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Jan 7, 9:28 PM (9 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
916954
Default Alt Text
MissingOverriddenTest.php (1 KB)
Attached To
rDAVCAL DokuWiki DAVCal PlugIn
Event Timeline
Log In to Comment