Adding skip for non-existence of DateTimeZone class in time helper tests.

This commit is contained in:
jperras 2009-10-19 12:51:06 -04:00
parent a36c2ec5bb
commit 7ff3fcc4c4

View file

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