Mercurial > hg > rc1
view vendor/sabre/vobject/tests/VObject/Recur/EventIterator/MissingOverriddenTest.php @ 35:05c4c32948af
.hgignore: add vendor tree
composer.json: new packages
plugins/thunderbird_labels/thunderbird_labels.php: change hook and RFC822 use wrt whitelisting to avoid deprecated stuff
index.php: commented debugging hooks
others: new releases of vendor packages?
| author | Charlie Root |
|---|---|
| date | Thu, 30 Aug 2018 16:21:59 -0400 |
| parents | 430dbd5346f7 |
| children |
line wrap: on
line source
<?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)); } }
