Permalink
Browse files

Add --showskipped to li3 test

  • Loading branch information...
1 parent 9511c05 commit 8cdf551b045e7fe48e237b9620ad6a5a7df28eb0 @hans-d committed May 24, 2012
Showing with 12 additions and 2 deletions.
  1. +11 −1 console/command/Test.php
  2. +1 −1 tests/cases/console/command/HelpTest.php
View
@@ -58,6 +58,16 @@ class Test extends \lithium\console\Command {
*/
public $verbose = false;
+ /**
+ * Enable output displaying skipped tests in the `txt` format.
+ *
+ * This can be seen as a little verbose mode. The `verbose` shows
+ * the skipped tests by default.
+ *
+ * @var boolean
+ */
+ public $showskipped = false;
+
/**
* Enable plain mode to prevent any headers or similar decoration being output.
* Good for command calls embedded into other scripts.
@@ -151,7 +161,7 @@ protected function _init() {
$command->out($report->render('result', $stats));
$command->out($report->render('errors', $stats));
- if ($command->verbose) {
+ if ($command->verbose || $command->showskipped) {
$command->out($report->render('skips', $stats));
}
@@ -54,7 +54,7 @@ public function testRunWithName() {
$this->assertTrue($result);
$expected = 'li3 test [--filters=<string>]';
- $expected .= ' [--format=<string>] [--verbose] [--plain] [<path>]';
+ $expected .= ' [--format=<string>] [--verbose] [--showskipped] [--plain] [<path>]';
$expected = preg_quote($expected);
$result = $command->response->output;
$this->assertPattern("/{$expected}/", $result);

2 comments on commit 8cdf551

Not sure about this, also if than we want the option to be named --show-skipped and mapped to $showSkipped. However currently such a mapping isn't possible due to missing functionality in the command construction.

Owner

hans-d replied May 24, 2012

As an alternative, we could provide values to verbose, eg high for the current verbose and skipped for my variation.
With no value it would default to high...

Please sign in to comment.