/** * @param \PHPUnit_Framework_TestSuite $suite */ public function startTestSuite(\PHPUnit_Framework_TestSuite $suite) { static $first = true; parent::startTestSuite($suite); if ($suite instanceof Spec\TestSuite) { // Skip root suite if (!$suite->getParent()) { return; } $levels = 0; if ($parent = $suite->getParent()) { while ($parent = $parent->getParent()) { $levels++; } } $output = "[37;4m" . $suite->getTitle() . "[0m"; $output = str_repeat(" ", $levels) . $output; if ($this->verbose && !$suite->getParent()->getParent()) { $filename = "[30;1m[" . basename($suite->getFilename()) . "][0m"; $output .= ' ' . $filename; } if ($first) { $first = false; } else { $this->write(PHP_EOL); } $this->write($output . PHP_EOL); } }
public function flush() { $this->write(PHP_EOL); parent::flush(); }