Example #1
0
 public function testToIcalDateFormatTimezone()
 {
     $event = new Event('test-1', new \DateTime('2015-01-01T00:00:00'));
     $event->between(new \DateTime('2015-01-02', new \DateTimeZone('America/New_York')), new \DateTime('2015-01-03', new \DateTimeZone('America/New_York')));
     $event->created(new \DateTime('2015-01-01'));
     $event->setDateFormat(DateTimeStamp::OUTPUT_TIMEZONE);
     $ical = $event->toIcal();
     $expected = file_get_contents(__DIR__ . '/../../mocks/component/event-timezone.ical');
     $this->assertEquals($expected, $ical);
 }