mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Added status notifications to cli test runs
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@62912 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
2a1d4376e2
commit
b031c8ff8b
@ -21,10 +21,19 @@ class CliTestReporter extends SapphireTestReporter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$result = ($failCount > 0) ? 'fail' : 'pass';
|
$result = ($failCount > 0) ? 'fail' : 'pass';
|
||||||
echo "$testCount tests run: $passCount passes, $failCount fails, and 0 exceptions\n\n";
|
echo "\n\n$testCount tests run: $passCount passes, $failCount fails, and 0 exceptions\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
public function endTest( PHPUnit_Framework_Test $test, $time) {
|
public function endTest( PHPUnit_Framework_Test $test, $time) {
|
||||||
|
// Status indicator, a la PHPUnit
|
||||||
|
switch($this->currentTest['status']) {
|
||||||
|
case TEST_FAILURE: echo "F"; break;
|
||||||
|
case TEST_ERROR: echo "E"; break;
|
||||||
|
case TEST_INCOMPLETE: echo "I"; break;
|
||||||
|
case TEST_SUCCESS: echo "."; break;
|
||||||
|
default: echo "?"; break;
|
||||||
|
}
|
||||||
|
|
||||||
parent::endTest($test, $time);
|
parent::endTest($test, $time);
|
||||||
$this->writeTest($this->currentTest);
|
$this->writeTest($this->currentTest);
|
||||||
}
|
}
|
||||||
|
@ -162,7 +162,7 @@ class TestRunner extends Controller {
|
|||||||
$suite->run($results);
|
$suite->run($results);
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<div class="trace">';
|
if(!Director::is_cli()) echo '<div class="trace">';
|
||||||
$reporter->writeResults();
|
$reporter->writeResults();
|
||||||
|
|
||||||
if(!Director::is_cli()) echo '</div>';
|
if(!Director::is_cli()) echo '</div>';
|
||||||
|
Loading…
Reference in New Issue
Block a user