[Pkg-owncloud-commits] [php-sabre-vobject] 05/43: Making sure this unittest doesn't break in some PHP versions.

David Prévot taffit at moszumanska.debian.org
Sat Jan 10 14:20:12 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 f19e94756b0b4365d2679f0b4fb3365b2d2dc8e2
Author: Evert Pot <me at evertpot.com>
Date:   Wed Dec 10 15:49:08 2014 -0500

    Making sure this unittest doesn't break in some PHP versions.
---
 tests/Sabre/VObject/TimeZoneUtilTest.php | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/Sabre/VObject/TimeZoneUtilTest.php b/tests/Sabre/VObject/TimeZoneUtilTest.php
index b898e8d..252e266 100644
--- a/tests/Sabre/VObject/TimeZoneUtilTest.php
+++ b/tests/Sabre/VObject/TimeZoneUtilTest.php
@@ -294,12 +294,12 @@ END:VCALENDAR
 HI;
 
         $tz = TimeZoneUtil::getTimeZone('/freeassociation.sourceforge.net/Tzfile/SystemV/EST5EDT', Reader::read($vobj), true);
-        if (version_compare(PHP_VERSION, '5.5.10', '>=')) {
-            $ex = new \DateTimeZone('America/New_York');
-        } else {
-            $ex = new \DateTimeZone('EST5EDT');
-        }
-        $this->assertEquals($ex->getName(), $tz->getName());
+
+        // Which timezone this maps to depends on the PHP version. This has
+        // changed a number of times in PHP's recent history.
+    $this->assertTrue(
+            $tz->getName() === 'EST5EDT' || $tz->getName() === 'America/New_York'
+        );
 
     }
 

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