Example #1
0
 public function testCalculateEndAfterTimestampForYearlyFrequency()
 {
     $this->event->repeat_frequency = Util::FREQUENCY_YEARLY;
     $this->event->start_timestamp = 1424952000;
     // Thursday, 26-Feb-15 12:00:00 UTC
     $this->event->end_timestamp = 1424955600;
     $this->event->end_delta = 3600;
     // 1 hour
     $this->event->repeat_weekly_days = array(Util::MONDAY, Util::FRIDAY, Util::SUNDAY);
     $from_timestamp = 1428249600;
     // Sunday, 05-Apr-15 16:00:00 UTC
     $expected = 1519646400;
     // Monday, 26-Feb-18 12:00:00 UTC
     $this->assertEquals($this->event->calculateEndAfterTimestamp(3, $from_timestamp, false), $expected);
 }