diff --git a/lib/Cake/Test/Case/Utility/DebuggerTest.php b/lib/Cake/Test/Case/Utility/DebuggerTest.php index 1df569288..e5817f87d 100644 --- a/lib/Cake/Test/Case/Utility/DebuggerTest.php +++ b/lib/Cake/Test/Case/Utility/DebuggerTest.php @@ -277,8 +277,11 @@ class DebuggerTest extends CakeTestCase { * @return void */ public function testTrimPath() { - $this->assertEquals(Debugger::trimPath(APP), 'APP' . DS); - $this->assertEquals(Debugger::trimPath(CAKE_CORE_INCLUDE_PATH), 'CORE'); + $this->assertEquals('APP' . DS, Debugger::trimPath(APP)); + $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')); } /** diff --git a/lib/Cake/Utility/Debugger.php b/lib/Cake/Utility/Debugger.php index 3a58cb326..e4daf5157 100644 --- a/lib/Cake/Utility/Debugger.php +++ b/lib/Cake/Utility/Debugger.php @@ -369,9 +369,6 @@ class Debugger { return str_replace(ROOT, 'ROOT', $path); } - if (strpos($path, CAKE) === 0) { - return str_replace($corePath, 'CORE' . DS, $path); - } return $path; }