PHPUnit_Framework_TestResult $result:
protected function printFooter(PHPUnit_Framework_TestResult $result) {
if (count($result) === 0) {
if ($this->colors) {
$this
->write("\33[30;43m\33[2K");
}
$this
->write("No tests executed!\n");
if ($this->colors) {
$this
->write("\33[0m\33[2K");
}
}
else {
if ($result
->wasSuccessful() && $result
->allCompletelyImplemented() && $result
->noneSkipped()) {
if ($this->colors) {
$this
->write("\33[30;42m\33[2K");
}
$this
->write(sprintf("OK (%d test%s, %d assertion%s)\n", count($result), count($result) == 1 ? '' : 's', $this->numAssertions, $this->numAssertions == 1 ? '' : 's'));
if ($this->colors) {
$this
->write("\33[0m\33[2K");
}
}
else {
if ((!$result
->allCompletelyImplemented() || !$result
->noneSkipped()) && $result
->wasSuccessful()) {
if ($this->colors) {
$this
->write("\33[30;43m\33[2KOK, but incomplete or skipped tests!\n" . "\33[0m\33[30;43m\33[2K");
}
else {
$this
->write("OK, but incomplete or skipped tests!\n");
}
$this
->write(sprintf("Tests: %d, Assertions: %d%s%s.\n", count($result), $this->numAssertions, $this
->getCountString($result
->notImplementedCount(), 'Incomplete'), $this
->getCountString($result
->skippedCount(), 'Skipped')));
if ($this->colors) {
$this
->write("\33[0m\33[2K");
}
}
else {
$this
->write("\n");
if ($this->colors) {
$this
->write("\33[37;41m\33[2KFAILURES!\n\33[0m\33[37;41m\33[2K");
}
else {
$this
->write("FAILURES!\n");
}
$this
->write(sprintf("Tests: %d, Assertions: %s%s%s%s%s.\n", count($result), $this->numAssertions, $this
->getCountString($result
->failureCount(), 'Failures'), $this
->getCountString($result
->errorCount(), 'Errors'), $this
->getCountString($result
->notImplementedCount(), 'Incomplete'), $this
->getCountString($result
->skippedCount(), 'Skipped')));
if ($this->colors) {
$this
->write("\33[0m\33[2K");
}
}
}
}
if (!$this->verbose && $result
->deprecatedFeaturesCount() > 0) {
$message = sprintf("Warning: Deprecated PHPUnit features are being used %s times!\n" . "Use --verbose for more information.\n", $result
->deprecatedFeaturesCount());
if ($this->colors) {
$message = "\33[37;41m\33[2K" . $message . "\33[0m";
}
$this
->write("\n" . $message);
}
}