Pulling windows specific tests into a separate test method.

This commit is contained in:
mark_story 2011-02-21 10:48:34 -05:00
parent d0b7d3355d
commit 1f9bbbce53

View file

@ -731,14 +731,6 @@ class TimeHelperTest extends CakeTestCase {
$expected = 4;
$this->assertEqual($result, $expected);
$result = $this->Time->convertSpecifiers('%e', $time);
$expected = '14';
$this->assertEqual($result, $expected);
$result = $this->Time->convertSpecifiers('%e', strtotime('2011-01-01'));
$expected = ' 1';
$this->assertEqual($result, $expected);
$result = $this->Time->convertSpecifiers('%x', $time);
$expected = '%d/%m/%y';
$this->assertEqual($result, $expected);
@ -748,6 +740,25 @@ class TimeHelperTest extends CakeTestCase {
$this->assertEqual($result, $expected);
}
/**
* test convert %e on windows.
*
* @return void
*/
function testConvertPercentE() {
if ($this->skipIf(DS !== '\\', 'Cannot run windows tests on non-windows OS')) {
return;
}
$time = strtotime('Thu Jan 14 11:43:39 2010');
$result = $this->Time->convertSpecifiers('%e', $time);
$expected = '14';
$this->assertEqual($result, $expected);
$result = $this->Time->convertSpecifiers('%e', strtotime('2011-01-01'));
$expected = ' 1';
$this->assertEqual($result, $expected);
}
/**
* test formatting dates taking in account preferred i18n locale file
*