Issue36WorkAroundTest.php 884 B

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