Permalink
Browse files

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

…DatetimeFieldTest
  • Loading branch information...
1 parent a3bcf0c commit 40db114218b15a4b0be6d37509148502de5c20b2 @chillu chillu committed Oct 6, 2011
Showing with 12 additions and 0 deletions.
  1. +3 −0 tests/forms/DateFieldTest.php
  2. +6 −0 tests/forms/DatetimeFieldTest.php
  3. +3 −0 tests/forms/TimeFieldTest.php
@@ -10,12 +10,15 @@ function setUp() {
$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 @@ function setUp() {
$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 @@ function setUp() {
$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() {

0 comments on commit 40db114

Please sign in to comment.