Merge pull request #817 from shama/patch-trimpath

Remove never reached code in Debugger::trimPath and test more results
This commit is contained in:
Mark Story 2012-09-05 17:12:23 -07:00
commit 878f18419c
2 changed files with 5 additions and 5 deletions

View file

@ -277,8 +277,11 @@ class DebuggerTest extends CakeTestCase {
* @return void * @return void
*/ */
public function testTrimPath() { public function testTrimPath() {
$this->assertEquals(Debugger::trimPath(APP), 'APP' . DS); $this->assertEquals('APP' . DS, Debugger::trimPath(APP));
$this->assertEquals(Debugger::trimPath(CAKE_CORE_INCLUDE_PATH), 'CORE'); $this->assertEquals('CORE', Debugger::trimPath(CAKE_CORE_INCLUDE_PATH));
$this->assertEquals('ROOT', Debugger::trimPath(ROOT));
$this->assertEquals('CORE' . DS . 'Cake' . DS, Debugger::trimPath(CAKE));
$this->assertEquals('Some/Other/Path', Debugger::trimPath('Some/Other/Path'));
} }
/** /**

View file

@ -369,9 +369,6 @@ class Debugger {
return str_replace(ROOT, 'ROOT', $path); return str_replace(ROOT, 'ROOT', $path);
} }
if (strpos($path, CAKE) === 0) {
return str_replace($corePath, 'CORE' . DS, $path);
}
return $path; return $path;
} }