mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Pulling windows specific tests into a separate test method.
This commit is contained in:
parent
d0b7d3355d
commit
1f9bbbce53
1 changed files with 19 additions and 8 deletions
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue