From 7ff3fcc4c4105e6a4475effff534f0429e1fe6aa Mon Sep 17 00:00:00 2001 From: jperras Date: Mon, 19 Oct 2009 12:51:06 -0400 Subject: [PATCH] Adding skip for non-existence of DateTimeZone class in time helper tests. --- cake/tests/cases/libs/view/helpers/time.test.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cake/tests/cases/libs/view/helpers/time.test.php b/cake/tests/cases/libs/view/helpers/time.test.php index 94da2a997..fbaff45ab 100644 --- a/cake/tests/cases/libs/view/helpers/time.test.php +++ b/cake/tests/cases/libs/view/helpers/time.test.php @@ -639,6 +639,8 @@ class TimeHelperTest extends CakeTestCase { * @return void */ function testUserOffset() { + $this->skipIf(!class_exists('DateTimeZone'), '%s DateTimeZone class not available.'); + $timezoneServer = new DateTimeZone(date_default_timezone_get()); $timeServer = new DateTime('now', $timezoneServer); $yourTimezone = $timezoneServer->getOffset($timeServer) / HOUR;