Permalink
Browse files

Pulling windows specific tests into a separate test method.

  • Loading branch information...
1 parent d0b7d33 commit 1f9bbbce53a15f3471bf3814da7b835a19274078 @markstory markstory committed Feb 21, 2011
Showing with 19 additions and 8 deletions.
  1. +19 −8 cake/tests/cases/libs/view/helpers/time.test.php
@@ -731,14 +731,6 @@ function testConvertSpecifiers() {
$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);
@@ -749,6 +741,25 @@ function testConvertSpecifiers() {
}
/**
+ * 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
*
* @access public

0 comments on commit 1f9bbbc

Please sign in to comment.