false failures correction, thanks to Michal Biniek

This commit is contained in:
Marc Delisle
2008-12-03 21:21:35 +00:00
parent 800762b81b
commit e20c3b5579

View File

@@ -37,6 +37,12 @@ class PMA_localisedDateTimespan_test extends PHPUnit_Framework_TestCase
protected $tmpSession;
/**
* temporary variable for timezone info
*/
protected $tmpTimezone;
/**
* storing globals and session
*/
@@ -44,7 +50,8 @@ class PMA_localisedDateTimespan_test extends PHPUnit_Framework_TestCase
$this->tmpGlobals = $GLOBALS;
$this->tmpSession = $_SESSION;
$this->tmpTimezone = date_default_timezone_get();
date_default_timezone_set('Europe/London');
}
/**
@@ -54,6 +61,7 @@ class PMA_localisedDateTimespan_test extends PHPUnit_Framework_TestCase
$GLOBALS = $this->tmpGlobals;
$_SESSION = $this->tmpSession;
date_default_timezone_set($this->tmpTimezone);
}
@@ -63,8 +71,8 @@ class PMA_localisedDateTimespan_test extends PHPUnit_Framework_TestCase
public function localisedDateDataProvider() {
return array(
array(1227451958, '', 'Nov 23, 2008 at 03:52 PM'),
array(1227451958, '%Y-%m-%d %H:%M:%S %a', '2008-11-23 15:52:38 Sun')
array(1227455558, '', 'Nov 23, 2008 at 03:52 PM'),
array(1227455558, '%Y-%m-%d %H:%M:%S %a', '2008-11-23 15:52:38 Sun')
);
}