Example #1
0
 public function testIsValidStartTime()
 {
     $this->event->repeat_frequency = Util::FREQUENCY_MONTHLY;
     $this->event->repeat_monthly_by = Util::REPEAT_MONTHLY_BY_DATE;
     $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);
     $this->event->repeat = true;
     $valid = 1430049600;
     // Sunday, 26-Apr-15 12:00:00 UTC
     $invalid = 1430049660;
     $this->assertTrue($this->event->isValidStartTime($valid));
     $this->assertFalse($this->event->isValidStartTime($invalid));
 }