1<?php 2 3namespace Sabre\VObject; 4 5use 6 DateTime, 7 DateTimeZone; 8 9class RecurrenceIteratorMissingOverriddenTest extends \PHPUnit_Framework_TestCase { 10 11 function testExpand() { 12 13 $input = <<<ICS 14BEGIN:VCALENDAR 15VERSION:2.0 16BEGIN:VEVENT 17UID:foo 18DTSTART:20130727T120000Z 19DURATION:PT1H 20RRULE:FREQ=DAILY;COUNT=2 21SUMMARY:A 22END:VEVENT 23BEGIN:VEVENT 24RECURRENCE-ID:20130728T120000Z 25UID:foo 26DTSTART:20140101T120000Z 27DURATION:PT1H 28SUMMARY:B 29END:VEVENT 30END:VCALENDAR 31ICS; 32 33 $vcal = Reader::read($input); 34 $this->assertInstanceOf('Sabre\\VObject\\Component\\VCalendar', $vcal); 35 36 $vcal->expand(new DateTime('2011-01-01'), new DateTime('2015-01-01')); 37 38 $result = $vcal->serialize(); 39 40 $output = <<<ICS 41BEGIN:VCALENDAR 42VERSION:2.0 43BEGIN:VEVENT 44UID:foo 45DTSTART:20130727T120000Z 46DURATION:PT1H 47SUMMARY:A 48END:VEVENT 49BEGIN:VEVENT 50RECURRENCE-ID:20130728T120000Z 51UID:foo 52DTSTART:20140101T120000Z 53DURATION:PT1H 54SUMMARY:B 55END:VEVENT 56END:VCALENDAR 57 58ICS; 59 $this->assertEquals($output, str_replace("\r","",$result)); 60 61 } 62 63} 64