示例#1
0
 /**
  *    Invokes a single test method on the test case.
  *    This call back allows the reporter to decide if
  *    it actually wants to run the test.
  *    @param SimpleRunner $runner    Test case to run test on.
  *    @param string $method          Name of test method.
  *    @access public
  */
 function invoke(&$runner, $method)
 {
     if (!$this->_is_dry_run) {
         $runner->invoke($method);
     }
 }
示例#2
0
 /**
  *    Invokes a test method and dispatches any
  *    untrapped errors. Called back from
  *    the visiting runner.
  *    @param string $method    Test method to call.
  *    @access public
  */
 function invoke($method)
 {
     set_error_handler('simpleTestErrorHandler');
     parent::invoke($method);
     $queue =& SimpleErrorQueue::instance();
     while (list($severity, $message, $file, $line, $globals) = $queue->extract()) {
         $test_case =& $this->_getTestCase();
         $test_case->error($severity, $message, $file, $line, $globals);
     }
     restore_error_handler();
 }