diff --git a/console/command/Test.php b/console/command/Test.php index a7c81fa79d..1486c0f4ea 100644 --- a/console/command/Test.php +++ b/console/command/Test.php @@ -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. * @@ -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;