Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Differ in exit codes.
  • Loading branch information
mariuswilms committed May 23, 2012
1 parent e9f0952 commit 4e2771f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions console/command/Test.php
Expand Up @@ -19,6 +19,11 @@
*/
class Test extends \lithium\console\Command {

/**
* Used as the exit code for errors where no test was mapped to file.
*/
const EXIT_NO_TEST = 4;

/**
* List of filters to apply before/during/after test run, separated by commas.
*
Expand Down Expand Up @@ -195,10 +200,11 @@ public function run($path = null) {
if (!$path = $this->_path($path)) {
return false;
}
if (strpos($path, 'tests') === false) {
if (stripos($path, 'test') === false) {
if (!$path = Unit::get($path)) {
var_dump('?');
$this->error('Cannot map path to test path.');
return false;
return static::EXIT_NO_TEST;
}
}
$handlers = $this->_handlers;
Expand Down

0 comments on commit 4e2771f

Please sign in to comment.