Permalink
Browse files

Adding skip for non-existence of DateTimeZone class in time helper te…

…sts.
  • Loading branch information...
1 parent a36c2ec commit 7ff3fcc4c4105e6a4475effff534f0429e1fe6aa @jperras jperras committed Oct 19, 2009
Showing with 2 additions and 0 deletions.
  1. +2 −0 cake/tests/cases/libs/view/helpers/time.test.php
View
2 cake/tests/cases/libs/view/helpers/time.test.php
@@ -639,6 +639,8 @@ function testWasWithinLast() {
* @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;

0 comments on commit 7ff3fcc

Please sign in to comment.