public function endPhaseGroup($result)
{
// tell the user what happened
$this->write(' ');
if ($result->getPhaseGroupSkipped()) {
$this->writePhaseGroupSkipped($result->getResultString());
} else {
if ($result->getPhaseGroupSucceeded()) {
$this->writePhaseGroupSucceeded($result->getResultString());
} else {
$this->writePhaseGroupFailed($result->getResultString());
}
}
// write out the duration too
$this->write(' (', $this->writer->punctuationStyle);
$this->writeDuration($result->getDuration());
$this->write(')' . PHP_EOL, $this->writer->punctuationStyle);
// remember the result for the final report
//
// we have to clone as the result object apparently changes
// afterwards. no idea why (yet)
$this->results[] = clone $result;
// if we are not connected to a terminal, we need to write out
// a detailed error report
if (!function_exists("posix_isatty") || !posix_isatty(STDOUT)) {
$this->writeDetailedErrorReport($result);
}
}