public function run(DoctrineTest_Reporter $reporter = null, $filter = null) { set_time_limit(900); $reporter->setTestCase($this); $reporter->paintHeader($this->_title); foreach ($this->_testCases as $k => $testCase) { $reporter->setTestCase($testCase); if (!$this->shouldBeRun($testCase, $filter)) { continue; } try { $testCase->run(); } catch (Exception $e) { $this->_failed += 1; $message = 'Unexpected ' . get_class($e) . ' thrown in [' . get_class($testCase) . '] with message [' . $e->getMessage() . '] in ' . $e->getFile() . ' on line ' . $e->getLine() . "\n\nTrace\n-------------\n\n" . $e->getTraceAsString(); $testCase->addMessage($message); } $this->_passed += $testCase->getPassCount(); $this->_failed += $testCase->getFailCount(); $this->_testCases[$k] = null; $reporter->paintMessages(); } $reporter->setTestCase($this); $reporter->paintMessages(); $this->cachePassesAndFails(); $reporter->paintFooter(); return $this->_failed ? false : true; }
public function paintMessages() { parent::paintMessages(); }