xref: /plugin/davcal/vendor/sabre/vobject/tests/VObject/Issue36WorkAroundTest.php (revision a1a3b6794e0e143a4a8b51d3185ce2d339be61ab)
1*a1a3b679SAndreas Boehler<?php
2*a1a3b679SAndreas Boehler
3*a1a3b679SAndreas Boehlernamespace Sabre\VObject;
4*a1a3b679SAndreas Boehler
5*a1a3b679SAndreas Boehlerclass Issue36WorkAroundTest extends \PHPUnit_Framework_TestCase {
6*a1a3b679SAndreas Boehler
7*a1a3b679SAndreas Boehler    function testWorkaround() {
8*a1a3b679SAndreas Boehler
9*a1a3b679SAndreas Boehler        // See https://github.com/fruux/sabre-vobject/issues/36
10*a1a3b679SAndreas Boehler        $event = <<<ICS
11*a1a3b679SAndreas BoehlerBEGIN:VCALENDAR
12*a1a3b679SAndreas BoehlerVERSION:2.0
13*a1a3b679SAndreas BoehlerBEGIN:VEVENT
14*a1a3b679SAndreas BoehlerSUMMARY:Titel
15*a1a3b679SAndreas BoehlerSEQUENCE:1
16*a1a3b679SAndreas BoehlerTRANSP:TRANSPARENT
17*a1a3b679SAndreas BoehlerRRULE:FREQ=YEARLY
18*a1a3b679SAndreas BoehlerLAST-MODIFIED:20130323T225737Z
19*a1a3b679SAndreas BoehlerDTSTAMP:20130323T225737Z
20*a1a3b679SAndreas BoehlerUID:1833bd44-188b-405c-9f85-1a12105318aa
21*a1a3b679SAndreas BoehlerCATEGORIES:Jubiläum
22*a1a3b679SAndreas BoehlerX-MOZ-GENERATION:3
23*a1a3b679SAndreas BoehlerRECURRENCE-ID;RANGE=THISANDFUTURE;VALUE=DATE:20131013
24*a1a3b679SAndreas BoehlerDTSTART;VALUE=DATE:20131013
25*a1a3b679SAndreas BoehlerCREATED:20100721T121914Z
26*a1a3b679SAndreas BoehlerDURATION:P1D
27*a1a3b679SAndreas BoehlerEND:VEVENT
28*a1a3b679SAndreas BoehlerEND:VCALENDAR
29*a1a3b679SAndreas BoehlerICS;
30*a1a3b679SAndreas Boehler
31*a1a3b679SAndreas Boehler        $obj = Reader::read($event);
32*a1a3b679SAndreas Boehler
33*a1a3b679SAndreas Boehler        // If this does not throw an exception, it's all good.
34*a1a3b679SAndreas Boehler        $it = new Recur\EventIterator($obj,'1833bd44-188b-405c-9f85-1a12105318aa');
35*a1a3b679SAndreas Boehler        $this->assertInstanceOf('Sabre\\VObject\\Recur\EventIterator', $it);
36*a1a3b679SAndreas Boehler
37*a1a3b679SAndreas Boehler    }
38*a1a3b679SAndreas Boehler
39*a1a3b679SAndreas Boehler}
40