[Pkg-owncloud-commits] [php-sabre-vobject] 01/08: Added isInTimeRange test for NoInstancesException case

David Prévot taffit at moszumanska.debian.org
Sat Sep 5 15:23:42 UTC 2015


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

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

commit 5a01188c2a60e603e88adc52e085d672a11e21fb
Author: Dominik Tobschall <dominik at fruux.com>
Date:   Wed Aug 26 13:57:55 2015 +0200

    Added isInTimeRange test for NoInstancesException case
    
    Conflicts:
    	tests/VObject/Component/VEventTest.php
---
 tests/VObject/Component/VEventTest.php | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/tests/VObject/Component/VEventTest.php b/tests/VObject/Component/VEventTest.php
index 0a78140..47e764a 100644
--- a/tests/VObject/Component/VEventTest.php
+++ b/tests/VObject/Component/VEventTest.php
@@ -71,6 +71,18 @@ class VEventTest extends \PHPUnit_Framework_TestCase {
         $vevent7->DTSTART['VALUE'] = 'DATE';
         $vevent7->RRULE = 'FREQ=MONTHLY';
         $tests[] = array($vevent7, new \DateTime('2012-02-01 15:00:00'), new \DateTime('2012-02-02'), true);
+        // The timezone of timerange in question should also be considered.
+        $tests[] = array($vevent7, new \DateTime('2012-02-02 00:00:00', new \DateTimeZone('Europe/Berlin')), new \DateTime('2012-02-03 00:00:00', new \DateTimeZone('Europe/Berlin')), false);
+
+        // Added this test to check recurring events that have no instances.
+        $vevent8 = clone $vevent;
+        $vevent8->DTSTART = '20130329T140000';
+        $vevent8->DTEND = '20130329T153000';
+        $vevent8->RRULE = array('FREQ' => 'WEEKLY', 'BYDAY' => array('FR'), 'UNTIL' => '20130412T115959Z');
+        $vevent8->add('EXDATE', '20130405T140000');
+        $vevent8->add('EXDATE', '20130329T140000');
+        $tests[] = array($vevent8, new \DateTime('2013-03-01'), new \DateTime('2013-04-01'), false);
+
         return $tests;
 
     }

-- 
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