mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUG Fix race conditions in DatetimeFieldTest
This commit is contained in:
parent
0cd40ca6e5
commit
9c63a8c8ce
@ -23,11 +23,14 @@ class DatetimeFieldTest extends SapphireTest
|
|||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
i18n::set_locale('en_NZ');
|
i18n::set_locale('en_NZ');
|
||||||
|
// Fix now to prevent race conditions
|
||||||
|
DBDatetime::set_mock_now('2010-04-04');
|
||||||
$this->timezone = date_default_timezone_get();
|
$this->timezone = date_default_timezone_get();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function tearDown()
|
protected function tearDown()
|
||||||
{
|
{
|
||||||
|
DBDatetime::clear_mock_now();
|
||||||
date_default_timezone_set($this->timezone);
|
date_default_timezone_set($this->timezone);
|
||||||
parent::tearDown(); // TODO: Change the autogenerated stub
|
parent::tearDown(); // TODO: Change the autogenerated stub
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user