diff options
author | friendica <info@friendica.com> | 2013-10-21 15:46:31 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-10-21 15:46:31 -0700 |
commit | b35122f7a6ad42756c35bb60ba1f06c3dcd45c77 (patch) | |
tree | ccdf373ce6475d264778523259cc32899b732fe7 /vendor/sabre/vobject/tests/Sabre/VObject/Issue48Test.php | |
parent | e3504df514d306cfe6b83e44a11f550664564af4 (diff) | |
download | volse-hubzilla-b35122f7a6ad42756c35bb60ba1f06c3dcd45c77.tar.gz volse-hubzilla-b35122f7a6ad42756c35bb60ba1f06c3dcd45c77.tar.bz2 volse-hubzilla-b35122f7a6ad42756c35bb60ba1f06c3dcd45c77.zip |
add sabre (1.8.x) via composer in the !@#$ place it wants to be
Diffstat (limited to 'vendor/sabre/vobject/tests/Sabre/VObject/Issue48Test.php')
-rw-r--r-- | vendor/sabre/vobject/tests/Sabre/VObject/Issue48Test.php | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/vendor/sabre/vobject/tests/Sabre/VObject/Issue48Test.php b/vendor/sabre/vobject/tests/Sabre/VObject/Issue48Test.php new file mode 100644 index 000000000..980d432b9 --- /dev/null +++ b/vendor/sabre/vobject/tests/Sabre/VObject/Issue48Test.php @@ -0,0 +1,47 @@ +<?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 RecurrenceIterator($vcal, 'foo'); + + $result = iterator_to_array($it); + + $tz = new DateTimeZone('Europe/Moscow'); + + $this->assertEquals(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), + ), $result); + + } + +} |