1<?php
2
3namespace Sabre\VObject;
4
5class Issue36WorkAroundTest extends \PHPUnit_Framework_TestCase {
6
7    function testWorkaround() {
8
9        // See https://github.com/fruux/sabre-vobject/issues/36
10        $event = <<<ICS
11BEGIN:VCALENDAR
12VERSION:2.0
13BEGIN:VEVENT
14SUMMARY:Titel
15SEQUENCE:1
16TRANSP:TRANSPARENT
17RRULE:FREQ=YEARLY
18LAST-MODIFIED:20130323T225737Z
19DTSTAMP:20130323T225737Z
20UID:1833bd44-188b-405c-9f85-1a12105318aa
21CATEGORIES:Jubiläum
22X-MOZ-GENERATION:3
23RECURRENCE-ID;RANGE=THISANDFUTURE;VALUE=DATE:20131013
24DTSTART;VALUE=DATE:20131013
25CREATED:20100721T121914Z
26DURATION:P1D
27END:VEVENT
28END:VCALENDAR
29ICS;
30
31        $obj = Reader::read($event);
32
33        // If this does not throw an exception, it's all good.
34        $it = new Recur\EventIterator($obj,'1833bd44-188b-405c-9f85-1a12105318aa');
35        $this->assertInstanceOf('Sabre\\VObject\\Recur\EventIterator', $it);
36
37    }
38
39}
40