Skip to content

Commit

Permalink
Remove never reached code in Debugger::trimPath and test more results
Browse files Browse the repository at this point in the history
  • Loading branch information
shama committed Sep 5, 2012
1 parent f1c2b1f commit a214fcd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 5 additions & 2 deletions lib/Cake/Test/Case/Utility/DebuggerTest.php
Expand Up @@ -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'));
}

/**
Expand Down
3 changes: 0 additions & 3 deletions lib/Cake/Utility/Debugger.php
Expand Up @@ -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;
}

Expand Down

0 comments on commit a214fcd

Please sign in to comment.