Skip to content
Browse files

Remove never reached code in Debugger::trimPath and test more results

  • Loading branch information...
1 parent f1c2b1f commit a214fcd9927277a5f3ca5b1bc85b525b649215c5 @shama shama committed
Showing with 5 additions and 5 deletions.
  1. +5 −2 lib/Cake/Test/Case/Utility/DebuggerTest.php
  2. +0 −3 lib/Cake/Utility/Debugger.php
View
7 lib/Cake/Test/Case/Utility/DebuggerTest.php
@@ -277,8 +277,11 @@ public function customFormat($error, $strings) {
* @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'));
}
/**
View
3 lib/Cake/Utility/Debugger.php
@@ -369,9 +369,6 @@ public static function trimPath($path) {
return str_replace(ROOT, 'ROOT', $path);
}
- if (strpos($path, CAKE) === 0) {
- return str_replace($corePath, 'CORE' . DS, $path);
- }
return $path;
}

0 comments on commit a214fcd

Please sign in to comment.
Something went wrong with that request. Please try again.