Example #1
0
 public function testGetTimesForYearlyFrequency()
 {
     $this->event->start_timestamp = 1424705400;
     // Monday, 23-Feb-15 15:30:00 UTC
     $this->event->repeat = true;
     $this->event->repeat_frequency = Util::FREQUENCY_YEARLY;
     $this->event->repeat_end_timestamp = 1577880000;
     // Wednesday, 01-Jan-20 12:00:00 UTC
     $range_start = 946728000;
     // Saturday, 01-Jan-00 12:00:00 UTC
     $range_end = 1735732800;
     // Wednesday, 01-Jan-25 12:00:00 UTC
     $start_times = array(1424705400, 1456241400, 1487863800, 1519399800, 1550935800);
     $this->assertEquals($this->event->getStartTimes($range_start, $range_end), $start_times);
 }