FIXED: Unnecessarily strict comparison of path separators in windows filenames

This commit is contained in:
Damian Mooyman 2012-09-27 13:41:28 +12:00
parent 61148834f2
commit 5ea2c3dc5a

View File

@ -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'))
);
}
}