MINOR Resetting date/time defaults for DateFieldTest, TimeFieldTest, DatetimeFieldTest

This commit is contained in:
Ingo Schommer 2011-10-06 14:23:54 +02:00
parent a3bcf0c61c
commit 40db114218
3 changed files with 12 additions and 0 deletions

View File

@ -10,12 +10,15 @@ class DateFieldTest extends SapphireTest {
$this->originalLocale = i18n::get_locale(); $this->originalLocale = i18n::get_locale();
i18n::set_locale('en_NZ'); i18n::set_locale('en_NZ');
$this->origDateFormat = DateField::$default_config['dateformat'];
DateField::$default_config['dateformat'] = 'dd/MM/yyyy';
} }
function tearDown() { function tearDown() {
parent::tearDown(); parent::tearDown();
i18n::set_locale($this->originalLocale); i18n::set_locale($this->originalLocale);
DateField::$default_config['dateformat'] = $this->origDateFormat;
} }
function testValidateMinDate() { function testValidateMinDate() {

View File

@ -10,12 +10,18 @@ class DatetimeFieldTest extends SapphireTest {
$this->originalLocale = i18n::get_locale(); $this->originalLocale = i18n::get_locale();
i18n::set_locale('en_NZ'); 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() { function tearDown() {
parent::tearDown(); parent::tearDown();
i18n::set_locale($this->originalLocale); i18n::set_locale($this->originalLocale);
DateField::$default_config['dateformat'] = $this->origDateFormat;
TimeField::$default_config['timeformat'] = $this->origTimeFormat;
} }
function testFormSaveInto() { function testFormSaveInto() {

View File

@ -10,12 +10,15 @@ class TimeFieldTest extends SapphireTest {
$this->originalLocale = i18n::get_locale(); $this->originalLocale = i18n::get_locale();
i18n::set_locale('en_NZ'); i18n::set_locale('en_NZ');
$this->origTimeFormat = TimeField::$default_config['timeformat'];
TimeField::$default_config['timeformat'] = 'HH:mm:ss';
} }
function tearDown() { function tearDown() {
parent::tearDown(); parent::tearDown();
i18n::set_locale($this->originalLocale); i18n::set_locale($this->originalLocale);
TimeField::$default_config['timeformat'] = $this->origTimeFormat;
} }
function testConstructorWithoutArgs() { function testConstructorWithoutArgs() {