. */ require_once 'phing/tasks/ext/phpunit/formatter/PHPUnitResultFormatter.php'; /** * Prints short summary output of the test to Phing's logging system. * * @author Michiel Rook * @version $Id: SummaryPHPUnitResultFormatter.php 905 2010-10-05 16:28:03Z mrook $ * @package phing.tasks.ext.formatter * @since 2.1.0 */ class SummaryPHPUnitResultFormatter extends PHPUnitResultFormatter { public function endTestSuite(PHPUnit_Framework_TestSuite $suite) { parent::endTestSuite($suite); } public function endTestRun() { parent::endTestRun(); $sb = "Tests run: " . $this->getRunCount(); $sb.= ", Failures: " . $this->getFailureCount(); $sb.= ", Errors: " . $this->getErrorCount(); $sb.= ", Incomplete: " . $this->getIncompleteCount(); $sb.= ", Skipped: " . $this->getSkippedCount(); $sb.= ", Time elapsed: " . sprintf('%0.5f', $this->getElapsedTime()) . " s\n"; if ($this->out != NULL) { $this->out->write($sb); $this->out->close(); } } public function getExtension() { return NULL; } }