From 5ea2c3dc5a5908dff374ebdc7d51d68b9ee30a37 Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Thu, 27 Sep 2012 13:41:28 +1200 Subject: [PATCH 1/2] FIXED: Unnecessarily strict comparison of path separators in windows filenames --- tests/core/manifest/ClassLoaderTest.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/core/manifest/ClassLoaderTest.php b/tests/core/manifest/ClassLoaderTest.php index d40f1ea37..bcf4c6c3b 100644 --- a/tests/core/manifest/ClassLoaderTest.php +++ b/tests/core/manifest/ClassLoaderTest.php @@ -37,13 +37,12 @@ class ClassLoaderTest extends SapphireTest { } public function testGetItemPath() { - $ds = DIRECTORY_SEPARATOR; $loader = new SS_ClassLoader(); $loader->pushManifest($this->testManifest1); $this->assertEquals( - $this->baseManifest1 . $ds . 'module' . $ds . 'classes' . $ds . 'ClassA.php', - $loader->getItemPath('ClassA') + realpath($this->baseManifest1 . '/module/classes/ClassA.php'), + realpath($loader->getItemPath('ClassA')) ); $this->assertEquals( false, @@ -64,8 +63,8 @@ class ClassLoaderTest extends SapphireTest { $loader->getItemPath('UnknownClass') ); $this->assertEquals( - $this->baseManifest2 . $ds . 'module' . $ds . 'classes' . $ds . 'OtherClassA.php', - $loader->getItemPath('OtherClassA') + realpath($this->baseManifest2 . '/module/classes/OtherClassA.php'), + realpath($loader->getItemPath('OtherClassA')) ); } } \ No newline at end of file From d54ef36b4743e49b4805a33fcae8f176ef28f1f3 Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Thu, 27 Sep 2012 13:54:19 +1200 Subject: [PATCH 2/2] FIXED: CSV Test cases now use platform-correct linebreak characters --- tests/dev/CSVParserTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/dev/CSVParserTest.php b/tests/dev/CSVParserTest.php index 219d1e652..37ec9316b 100644 --- a/tests/dev/CSVParserTest.php +++ b/tests/dev/CSVParserTest.php @@ -19,7 +19,7 @@ class CSVParserTest extends SapphireTest { $this->assertEquals(array( "He's a good guy", - "She is awesome.\nSo awesome that she gets multiple rows and \"escaped\" strings in her biography", + "She is awesome." . PHP_EOL . "So awesome that she gets multiple rows and \"escaped\" strings in her biography", "Pretty old, with an escaped comma", "Unicode FTW"), $biographies); $this->assertEquals(array("31/01/1988","31/01/1982","31/01/1882","31/06/1982"), $birthdays); @@ -49,7 +49,7 @@ class CSVParserTest extends SapphireTest { $this->assertEquals(array('John','Jane','Jamie','Järg'), $firstNames); $this->assertEquals(array( "He's a good guy", - "She is awesome.\nSo awesome that she gets multiple rows and \"escaped\" strings in her biography", + "She is awesome." . PHP_EOL . "So awesome that she gets multiple rows and \"escaped\" strings in her biography", "Pretty old, with an escaped comma", "Unicode FTW"), $biographies); $this->assertEquals(array("31/01/1988","31/01/1982","31/01/1882","31/06/1982"), $birthdays); @@ -77,7 +77,7 @@ class CSVParserTest extends SapphireTest { $this->assertEquals(array( 'Biography', "He's a good guy", - "She is awesome.\nSo awesome that she gets multiple rows and \"escaped\" strings in her biography", + "She is awesome." . PHP_EOL . "So awesome that she gets multiple rows and \"escaped\" strings in her biography", "Pretty old, with an escaped comma", "Unicode FTW"), $biographies); $this->assertEquals(array("Birthday","31/01/1988","31/01/1982","31/01/1882","31/06/1982"), $birthdays);