mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Adding skip for non-existence of DateTimeZone class in time helper tests.
This commit is contained in:
parent
a36c2ec5bb
commit
7ff3fcc4c4
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue