[Pkg-owncloud-commits] [php-sabre-vobject] 21/38: Added test for first instance EXDATE issue

David Prévot taffit at moszumanska.debian.org
Tue Sep 23 03:10:22 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch upstream
in repository php-sabre-vobject.

commit 55a3718faa0aa7c9d9c64ae5014254a8af938672
Author: Dominik Tobschall <dominik at fruux.com>
Date:   Wed Sep 17 12:15:33 2014 +0200

    Added test for first instance EXDATE issue
---
 tests/VObject/IssueEXDATETest.php | 45 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/tests/VObject/IssueEXDATETest.php b/tests/VObject/IssueEXDATETest.php
new file mode 100644
index 0000000..a81395c
--- /dev/null
+++ b/tests/VObject/IssueEXDATETest.php
@@ -0,0 +1,45 @@
+<?php
+
+namespace Sabre\VObject;
+
+use
+    DateTime,
+    DateTimeZone;
+
+class IssueEXDATETest extends \PHPUnit_Framework_TestCase {
+
+    function testRecurrence() {
+
+        $input = <<<ICS
+BEGIN:VCALENDAR
+BEGIN:VEVENT
+DTSTART;TZID=Europe/Berlin:20130329T140000
+DTEND;TZID=Europe/Berlin:20130329T153000
+RRULE:FREQ=WEEKLY;BYDAY=FR;UNTIL=20130412T115959Z
+EXDATE;TZID=Europe/Berlin:20130405T140000
+EXDATE;TZID=Europe/Berlin:20130329T140000
+DTSTAMP:20140916T201215Z
+UID:foo
+SEQUENCE:1
+SUMMARY:foo
+END:VEVENT
+END:VCALENDAR
+ICS;
+
+        $vcal = Reader::read($input);
+        $this->assertInstanceOf('Sabre\\VObject\\Component\\VCalendar', $vcal);
+
+        $it = new Recur\EventIterator($vcal, 'foo');
+
+        $end = $it->getDtEnd();
+
+        while($it->valid()) {
+            $end = $it->getDtEnd();
+            $it->next();
+        }
+
+        $entity->lastOccurence = $end->getTimeStamp();
+
+    }
+
+}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabre-vobject.git



More information about the Pkg-owncloud-commits mailing list