Permalink
Browse files

Differ in exit codes.

  • Loading branch information...
1 parent e9f0952 commit 4e2771f48c5038f56712b9c24058b659a207c48e @davidpersson davidpersson committed May 22, 2012
Showing with 8 additions and 2 deletions.
  1. +8 −2 console/command/Test.php
@@ -20,6 +20,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.
*
* For example:
@@ -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;

0 comments on commit 4e2771f

Please sign in to comment.