ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
MaxInstancesTest.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
Sabre\VObject\Recur\EventIterator
;
4
5
use
DateTime
;
6
use
PHPUnit\Framework\TestCase
;
7
use
Sabre\VObject\Reader
;
8
use
Sabre\VObject\Settings
;
9
10
class
MaxInstancesTest
extends
TestCase {
11
15
function
testExceedMaxRecurrences
() {
16
17
$input
= <<<ICS
18
BEGIN:VCALENDAR
19
VERSION:2.0
20
BEGIN:VEVENT
21
UID:foobar
22
DTSTART:20140803T120000Z
23
RRULE:FREQ=WEEKLY
24
SUMMARY:Original
25
END:VEVENT
26
END:VCALENDAR
27
ICS;
28
29
$temp =
Settings::$maxRecurrences
;
30
Settings::$maxRecurrences
= 4;
31
try
{
32
33
$vcal
=
Reader::read
(
$input
);
34
$vcal
->expand(
new
DateTime
(
'2014-08-01'
),
new
DateTime
(
'2014-09-01'
));
35
36
}
finally
{
37
Settings::$maxRecurrences
= $temp;
38
}
39
40
}
41
42
}
DateTime
$vcal
$vcal
Definition:
bench_freebusygenerator.php:22
Sabre\VObject\$input
if($argc< 3) $input
Definition:
mergeduplicates.php:35
Sabre\VObject\Recur\EventIterator\MaxInstancesTest\testExceedMaxRecurrences
testExceedMaxRecurrences()
Definition:
MaxInstancesTest.php:15
Sabre\VObject\Settings\$maxRecurrences
static $maxRecurrences
The maximum number of recurrences that will be generated.
Definition:
Settings.php:54
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
Settings
TestCase
Sabre\VObject\Recur\EventIterator\MaxInstancesTest
Definition:
MaxInstancesTest.php:10
libs
composer
vendor
sabre
vobject
tests
VObject
Recur
EventIterator
MaxInstancesTest.php
Generated on Thu Jan 16 2025 19:01:54 for ILIAS by
1.8.13 (using
Doxyfile
)