protected outputError ( integer $errorNumber, Peridot\Core\TestInterface $test, $exception ) | ||
$errorNumber | integer | |
$test | Peridot\Core\TestInterface | |
$exception | - an exception like interface with ->getMessage(), ->getTraceAsString() |
protected function outputError($errorNumber, TestInterface $test, $exception)
{
$this->output->writeln(sprintf(" %d)%s:", $errorNumber, $test->getTitle()));
$message = sprintf(" %s", str_replace(PHP_EOL, PHP_EOL . " ", $exception->getMessage()));
$this->output->writeln($this->color('error', $message));
$trace = preg_replace('/^#/m', " #", $exception->getTraceAsString());
$this->output->writeln($this->color('muted', $trace));
}