mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge pull request #817 from shama/patch-trimpath
Remove never reached code in Debugger::trimPath and test more results
This commit is contained in:
commit
878f18419c
2 changed files with 5 additions and 5 deletions
|
@ -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'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue