ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
FifthTuesdayProblemTest.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
Sabre\VObject\Recur\EventIterator
;
4
5
use
PHPUnit\Framework\TestCase
;
6
use
Sabre\VObject\Reader
;
7
use
Sabre\VObject\Recur
;
8
9
class
FifthTuesdayProblemTest
extends
TestCase {
10
17
function
testGetDTEnd
() {
18
19
$ics = <<<ICS
20
BEGIN:VCALENDAR
21
VERSION:2.0
22
PRODID:-
//Apple Inc.//iCal 4.0.4//EN
23
CALSCALE:GREGORIAN
24
BEGIN:VEVENT
25
TRANSP:OPAQUE
26
DTEND;TZID=America/New_York:20070925T170000
27
UID:uuid
28
DTSTAMP:19700101T000000Z
29
LOCATION:
30
DESCRIPTION:
31
STATUS:CONFIRMED
32
SEQUENCE:18
33
SUMMARY:Stuff
34
DTSTART;TZID=America/New_York:20070925T160000
35
CREATED:20071004T144642Z
36
RRULE:FREQ=MONTHLY;INTERVAL=1;UNTIL=20071030T035959Z;BYDAY=5TU
37
END:VEVENT
38
END:VCALENDAR
39
ICS;
40
41
$vObject =
Reader::read
($ics);
42
$it =
new
Recur\EventIterator
($vObject, (
string
)$vObject->VEVENT->UID);
43
44
while
($it->valid()) {
45
$it->next();
46
}
47
48
// If we got here, it means we were successful. The bug that was in the
49
// system before would fail on the 5th tuesday of the month, if the 5th
50
// tuesday did not exist.
51
$this->assertTrue(
true
);
52
53
}
54
55
}
Sabre\VObject\Recur
Definition:
EventIterator.php:3
Sabre\VObject\Recur\EventIterator\FifthTuesdayProblemTest
Definition:
FifthTuesdayProblemTest.php:9
Sabre\VObject\Recur\EventIterator
This class is used to determine new for a recurring event, when the next events occur.
Definition:
EventIterator.php:61
Sabre\VObject\Recur\EventIterator\FifthTuesdayProblemTest\testGetDTEnd
testGetDTEnd()
A pretty slow test.
Definition:
FifthTuesdayProblemTest.php:17
Sabre\VObject\Recur\EventIterator
Definition:
ExpandFloatingTimesTest.php:3
Reader
Sabre\VObject\Reader\read
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
Definition:
Reader.php:42
php
TestCase
libs
composer
vendor
sabre
vobject
tests
VObject
Recur
EventIterator
FifthTuesdayProblemTest.php
Generated on Thu Jan 30 2025 19:01:30 for ILIAS by
1.8.13 (using
Doxyfile
)