mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Resetting date/time defaults for DateFieldTest, TimeFieldTest, DatetimeFieldTest
This commit is contained in:
parent
a3bcf0c61c
commit
40db114218
@ -10,12 +10,15 @@ class DateFieldTest extends SapphireTest {
|
||||
|
||||
$this->originalLocale = i18n::get_locale();
|
||||
i18n::set_locale('en_NZ');
|
||||
$this->origDateFormat = DateField::$default_config['dateformat'];
|
||||
DateField::$default_config['dateformat'] = 'dd/MM/yyyy';
|
||||
}
|
||||
|
||||
function tearDown() {
|
||||
parent::tearDown();
|
||||
|
||||
i18n::set_locale($this->originalLocale);
|
||||
DateField::$default_config['dateformat'] = $this->origDateFormat;
|
||||
}
|
||||
|
||||
function testValidateMinDate() {
|
||||
|
@ -10,12 +10,18 @@ class DatetimeFieldTest extends SapphireTest {
|
||||
|
||||
$this->originalLocale = i18n::get_locale();
|
||||
i18n::set_locale('en_NZ');
|
||||
$this->origDateFormat = DateField::$default_config['dateformat'];
|
||||
DateField::$default_config['dateformat'] = 'dd/MM/yyyy';
|
||||
$this->origTimeFormat = TimeField::$default_config['timeformat'];
|
||||
TimeField::$default_config['timeformat'] = 'HH:mm:ss';
|
||||
}
|
||||
|
||||
function tearDown() {
|
||||
parent::tearDown();
|
||||
|
||||
i18n::set_locale($this->originalLocale);
|
||||
DateField::$default_config['dateformat'] = $this->origDateFormat;
|
||||
TimeField::$default_config['timeformat'] = $this->origTimeFormat;
|
||||
}
|
||||
|
||||
function testFormSaveInto() {
|
||||
|
@ -10,12 +10,15 @@ class TimeFieldTest extends SapphireTest {
|
||||
|
||||
$this->originalLocale = i18n::get_locale();
|
||||
i18n::set_locale('en_NZ');
|
||||
$this->origTimeFormat = TimeField::$default_config['timeformat'];
|
||||
TimeField::$default_config['timeformat'] = 'HH:mm:ss';
|
||||
}
|
||||
|
||||
function tearDown() {
|
||||
parent::tearDown();
|
||||
|
||||
i18n::set_locale($this->originalLocale);
|
||||
TimeField::$default_config['timeformat'] = $this->origTimeFormat;
|
||||
}
|
||||
|
||||
function testConstructorWithoutArgs() {
|
||||
|
Loading…
Reference in New Issue
Block a user