ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Issue36WorkAroundTest.php
Go to the documentation of this file.
1<?php
2
3namespace Sabre\VObject;
4
5use PHPUnit\Framework\TestCase;
6
7class Issue36WorkAroundTest extends TestCase {
8
9 function testWorkaround() {
10
11 // See https://github.com/fruux/sabre-vobject/issues/36
12 $event = <<<ICS
13BEGIN:VCALENDAR
14VERSION:2.0
15BEGIN:VEVENT
16SUMMARY:Titel
17SEQUENCE:1
18TRANSP:TRANSPARENT
19RRULE:FREQ=YEARLY
20LAST-MODIFIED:20130323T225737Z
21DTSTAMP:20130323T225737Z
22UID:1833bd44-188b-405c-9f85-1a12105318aa
23CATEGORIES:Jubiläum
24X-MOZ-GENERATION:3
25RECURRENCE-ID;RANGE=THISANDFUTURE;VALUE=DATE:20131013
26DTSTART;VALUE=DATE:20131013
27CREATED:20100721T121914Z
28DURATION:P1D
29END:VEVENT
30END:VCALENDAR
31ICS;
32
33 $obj = Reader::read($event);
34
35 // If this does not throw an exception, it's all good.
36 $it = new Recur\EventIterator($obj, '1833bd44-188b-405c-9f85-1a12105318aa');
37 $this->assertInstanceOf('Sabre\\VObject\\Recur\\EventIterator', $it);
38
39 }
40
41}
An exception for terminatinating execution or to throw for unit testing.
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
Definition: Reader.php:42
This class is used to determine new for a recurring event, when the next events occur.