function run(&$reporter) { SimpleTest::setCurrent($this); $reporter->paintCaseStart($this->getLabel()); $this->_runner =& $this->_createRunner($reporter); $this->_runner->run(); $this->_runner = false; $reporter->paintCaseEnd($this->getLabel()); return $reporter->getStatus(); }
function run(&$reporter) { SimpleTest::setCurrent($this); $this->_reporter =& $reporter; $this->_reporter->paintCaseStart($this->getLabel()); if ($this->needPDO) { $this->_reporter->makeDry(!$this->assertTrue(class_exists('PDO', false), 'PDO does not exists ! You should install PDO because tests need it.')); } foreach ($this->getTests() as $method) { if ($this->_reporter->shouldInvoke($this->getLabel(), $method)) { $invoker =& $this->_reporter->createInvoker($this->createInvoker()); $invoker->before($method); $invoker->invoke($method); $invoker->after($method); } } $this->_reporter->paintCaseEnd($this->getLabel()); unset($this->_reporter); return $reporter->getStatus(); }
/** * Uses reflection to run every method within itself * starting with the string "test" unless a method * is specified. * @param SimpleReporter $reporter Current test reporter. * @access public */ function run(&$reporter) { SimpleTest::setCurrent($this); $this->_reporter =& $reporter; $this->_reporter->paintCaseStart($this->getLabel()); foreach ($this->getTests() as $method) { if ($this->_reporter->shouldInvoke($this->getLabel(), $method)) { $invoker =& $this->_reporter->createInvoker($this->createInvoker()); $invoker->before($method); $invoker->invoke($method); $invoker->after($method); } } $this->_reporter->paintCaseEnd($this->getLabel()); unset($this->_reporter); return $reporter->getStatus(); }