public function testCacheCount() { $rule = 'FREQ=YEARLY;INTERVAL=2;BYYEARDAY=1;COUNT=5'; $start = strtotime('2011-01-01T090000'); $freq = new SG_iCal_Freq($rule, $start); $this->assertEquals(5, count($freq->getAllOccurrences())); $this->assertEquals(strtotime('2019-01-01T09:00:00'), $freq->lastOccurrence()); }
public function testLastOccurrence() { $rule = 'FREQ=YEARLY;INTERVAL=2;BYYEARDAY=1;COUNT=5'; $start = strtotime('2009-10-27T090000'); $freq = new SG_iCal_Freq($rule, $start); $this->assertEquals(strtotime('2018-01-01T09:00:00'), $freq->lastOccurrence()); }