[Pkg-owncloud-commits] [php-sabre-vobject] 275/341: adding tests to show failing vEvent->isInTimeRange() on all-day events

David Prévot taffit at moszumanska.debian.org
Tue Aug 11 13:35:56 UTC 2015


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

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

commit 53b045919280d0637a27bbdec655465a2534246f
Author: Armin Hackmann <armin at fruux.com>
Date:   Tue Jun 9 15:02:15 2015 +0200

    adding tests to show failing vEvent->isInTimeRange() on all-day events
---
 tests/VObject/Component/VEventTest.php | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/VObject/Component/VEventTest.php b/tests/VObject/Component/VEventTest.php
index c51410f..0a78140 100644
--- a/tests/VObject/Component/VEventTest.php
+++ b/tests/VObject/Component/VEventTest.php
@@ -43,7 +43,10 @@ class VEventTest extends \PHPUnit_Framework_TestCase {
         $tests[] = array($vevent4, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false);
         // Event with no end date should be treated as lasting the entire day.
         $tests[] = array($vevent4, new \DateTime('2011-12-25 16:00:00'), new \DateTime('2011-12-25 17:00:00'), true);
-
+        // DTEND is non inclusive so all day events should not be returned on the next day.
+        $tests[] = array($vevent4, new \DateTime('2011-12-26 00:00:00'), new \DateTime('2011-12-26 17:00:00'), false);
+        // The timezone of timerange in question also needs to be considered.
+        $tests[] = array($vevent4, new \DateTime('2011-12-26 00:00:00', new \DateTimeZone('Europe/Berlin')), new \DateTime('2011-12-26 17:00:00', new \DateTimeZone('Europe/Berlin')), false);
 
         $vevent5 = clone $vevent;
         $vevent5->DURATION = 'P1D';

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