/** * @param PHPUnit_Framework_Test $test */ private function writeDiagnostics(PHPUnit_Framework_Test $test) { if (!$test instanceof PHPUnit_Framework_TestCase) { return; } if (!$test->hasOutput()) { return; } foreach (explode("\n", trim($test->getActualOutput())) as $line) { $this->write(sprintf("# %s\n", $line)); } }