Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ENHANCEMENT If there are no test failures, but incomplete tests, mark

summary of test run as "ok but incomplete" in yellow for CliTestReporter
  • Loading branch information...
commit ce097a7b54ff0be93cb812c759bfc620fc0ee7c9 1 parent edaed5e
Sean Harvey halkyon authored
Showing with 8 additions and 6 deletions.
  1. +8 −6 dev/CliTestReporter.php
14 dev/CliTestReporter.php
View
@@ -31,10 +31,12 @@ public function writeResults() {
}
echo "\n\n";
- if ($failCount == 0) {
- echo SS_Cli::text(" ALL TESTS PASS ", "white", "green");
+ if ($failCount == 0 && $incompleteCount > 0) {
+ echo SS_Cli::text(" OK, BUT INCOMPLETE TESTS! ", "black", "yellow");
+ } elseif ($failCount == 0) {
+ echo SS_Cli::text(" ALL TESTS PASS ", "black", "green");
} else {
- echo SS_Cli::text(" AT LEAST ONE FAILURE ", "white", "red");
+ echo SS_Cli::text(" AT LEAST ONE FAILURE ", "black", "red");
}
echo sprintf("\n\n%d tests run: %s, %s, and %s\n", $testCount, SS_Cli::text("$passCount passes"), SS_Cli::text("$failCount failures"), SS_Cli::text("$incompleteCount incomplete"));
@@ -97,12 +99,12 @@ protected function writeTest($test) {
}
if( $test['status'] == 2) {
- echo "\n" . SS_Cli::text($this->testNameToPhrase($test['name']) . "\n" . $test['message'] . "\n", 'yellow', null, true);
+ echo "\n" . SS_Cli::text($test['name'] . "\n" . $test['message'] . "\n", 'yellow', null);
} else {
- echo "\n" . SS_Cli::text($this->testNameToPhrase($test['name']) . "\n". $test['message'] . "\n", 'red', null, true);
+ echo "\n" . SS_Cli::text($test['name'] . "\n". $test['message'] . "\n", 'red', null);
echo SS_Backtrace::get_rendered_backtrace($filteredTrace, true);
}
- echo "\n--------------------\n";
+ echo "--------------------\n";
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.