7use PHPUnit\Framework\TestCase;
25 $ev = $this->vcal->createComponent(
'VEVENT');
27 $ev->DTSTART =
'20090420T180000Z';
28 $ev->RRULE =
'FREQ=WEEKLY;BYDAY=MO;UNTIL=20090704T205959Z;INTERVAL=1';
30 $this->assertFalse($ev->isInTimeRange(
new DateTimeImmutable(
'2012-01-01 12:00:00'),
new DateTimeImmutable(
'3000-01-01 00:00:00')));
39 $ev = $this->vcal->createComponent(
'VEVENT');
41 $ev->DTSTART =
'20120101T154500';
42 $ev->DTSTART[
'TZID'] =
'Europe/Berlin';
43 $ev->RRULE =
'FREQ=YEARLY;INTERVAL=1;UNTIL=20120203T225959Z;BYMONTH=2;BYSETPOS=1;BYDAY=SU,MO,TU,WE,TH,FR,SA';
44 $ev->DTEND =
'20120101T164500';
45 $ev->DTEND[
'TZID'] =
'Europe/Berlin';
53 $this->vcal->add($ev);
56 $it->fastForward(
new DateTimeImmutable(
'2012-01-29 23:00:00',
new DateTimeZone(
'UTC')));
60 while ($it->valid()) {
61 $collect[] = $it->getDtStart();
62 if ($it->getDtStart() >
new DateTimeImmutable(
'2013-02-05 22:59:59',
new DateTimeZone(
'UTC'))) {
70 [
new DateTimeImmutable(
'2012-02-01 15:45:00',
new DateTimeZone(
'Europe/Berlin'))],
86 $ev = $this->vcal->createComponent(
'VEVENT');
88 $ev->DTSTART =
'20120824T145700Z';
89 $ev->RRULE =
'FREQ=YEARLY;INTERVAL=0';
90 $this->vcal->add($ev);
93 $it->fastForward(
new DateTimeImmutable(
'2013-01-01 23:00:00',
new DateTimeZone(
'UTC')));
An exception for terminatinating execution or to throw for unit testing.
testYearlyByMonthLoop()
Different bug, also likely an infinite loop.
testFastForwardTooFar()
This bug came from a Fruux customer.
testZeroInterval()
Something, somewhere produced an ics with an interval set to 0.
This class is used to determine new for a recurring event, when the next events occur.