Skip to content

Commit

Permalink
Fixing test loading in cli
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Apr 12, 2011
1 parent 9d90c55 commit 75a1481
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Cake/Console/Command/TestsuiteShell.php
Expand Up @@ -193,7 +193,7 @@ protected function parseArgs() {
}

if (isset($this->args[1])) {
$params['case'] = Inflector::underscore($this->args[1]);
$params['case'] = $this->args[1];
}
return $params;
}
Expand Down Expand Up @@ -289,8 +289,8 @@ public function available() {
$i = 1;
$cases = array();
foreach ($testCases as $testCaseFile => $testCase) {
$case = explode(DS, str_replace('.test.php', '', $testCase));
$case[count($case) - 1] = Inflector::camelize($case[count($case) - 1]);
$case = explode(DS, str_replace('Test.php', '', $testCase));
$case[count($case) - 1] = $case[count($case) - 1];

This comment has been minimized.

Copy link
@evilbloodydemon

evilbloodydemon Apr 21, 2011

Contributor

refactoring artifact - left and right parts are equal now

This comment has been minimized.

Copy link
@renan

renan Apr 21, 2011

Contributor

Right, in this case only doing the code below seems to be enough:
$case = str_replace('Test.php', '', $testCase);

No need to explode and implode, I guess.

This comment has been minimized.

Copy link
@lorenzo

lorenzo Apr 21, 2011

Author Member

Nice catch! thanks!

$case = implode('/', $case);
$this->out("[$i] $case");
$cases[$i] = $case;
Expand Down
1 change: 1 addition & 0 deletions lib/Cake/Error/ExceptionRenderer.php
Expand Up @@ -21,6 +21,7 @@
*/

App::uses('Sanitize', 'Utility');
App::uses('Router', 'Routing');

/**
* Exception Renderer.
Expand Down

0 comments on commit 75a1481

Please sign in to comment.