assertInstanceOf('Sabre\\VObject\\Component\\VCalendar', $vcal); $it = new Recur\EventIterator($vcal, 'foo'); $result = iterator_to_array($it); $tz = new DateTimeZone('Europe/Moscow'); $expected = [ new DateTimeImmutable('2013-07-10 11:00:00', $tz), new DateTimeImmutable('2013-07-12 11:00:00', $tz), new DateTimeImmutable('2013-07-13 11:00:00', $tz), ]; $this->assertEquals($expected, $result); } }