From 1f9bbbce53a15f3471bf3814da7b835a19274078 Mon Sep 17 00:00:00 2001 From: mark_story Date: Mon, 21 Feb 2011 10:48:34 -0500 Subject: [PATCH] Pulling windows specific tests into a separate test method. --- .../cases/libs/view/helpers/time.test.php | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/cake/tests/cases/libs/view/helpers/time.test.php b/cake/tests/cases/libs/view/helpers/time.test.php index cbe42d2a1..5501750cf 100644 --- a/cake/tests/cases/libs/view/helpers/time.test.php +++ b/cake/tests/cases/libs/view/helpers/time.test.php @@ -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 *