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') ); $this->assertEquals( false, $loader->getItemPath('UnknownClass') ); $this->assertEquals( false, $loader->getItemPath('OtherClassA') ); $loader->pushManifest($this->testManifest2); $this->assertEquals( false, $loader->getItemPath('ClassA') ); $this->assertEquals( false, $loader->getItemPath('UnknownClass') ); $this->assertEquals( $this->baseManifest2 . $ds . 'module' . $ds . 'classes' . $ds . 'OtherClassA.php', $loader->getItemPath('OtherClassA') ); }
public function testGetItemPath() { $loader = new SS_ClassLoader(); $loader->pushManifest($this->testManifest1); $this->assertEquals(realpath($this->baseManifest1 . '/module/classes/ClassA.php'), realpath($loader->getItemPath('ClassA'))); $this->assertEquals(false, $loader->getItemPath('UnknownClass')); $this->assertEquals(false, $loader->getItemPath('OtherClassA')); $loader->pushManifest($this->testManifest2); $this->assertEquals(false, $loader->getItemPath('ClassA')); $this->assertEquals(false, $loader->getItemPath('UnknownClass')); $this->assertEquals(realpath($this->baseManifest2 . '/module/classes/OtherClassA.php'), realpath($loader->getItemPath('OtherClassA'))); }