Exemplo n.º 1
0
 /**
  *    Uses reflection to run every method within itself
  *    starting with the string "test" unless a method
  *    is specified.
  *    @param SimpleReporter $reporter    Current test reporter.
  *    @return boolean                    True if all tests passed.
  *    @access public
  */
 function run(&$reporter)
 {
     $this->setUpFixture();
     $ret = parent::run($reporter);
     $this->tearDownFixture();
     return $ret;
 }
Exemplo n.º 2
0
 function run(&$reporter)
 {
     $this->pre_run();
     parent::run($reporter);
     $this->post_run();
 }
Exemplo n.º 3
0
 /**
  * Set necessary reporter info.
  */
 function run(&$reporter)
 {
     $arr = array('class' => get_class($this));
     if (method_exists($this, 'getInfo')) {
         $arr = array_merge($arr, $this->getInfo());
     }
     $reporter->test_info_stack[] = $arr;
     parent::run($reporter);
     array_pop($reporter->test_info_stack);
 }
Exemplo n.º 4
0
 /**
  * Extend run() method to recognize cli mode.
  *
  * @param SimpleReporter Reporter for HTML mode
  * @param SimpleReporter Reporter for CLI mode
  * @access public
  */
 function run_html_or_cli()
 {
     if (EvoTextReporter::inCli()) {
         exit(parent::run(new EvoTextReporter()) ? 0 : 1);
     }
     parent::run(new EvoHtmlReporter());
 }