run() public method

Uses reflection to run every method within itself starting with the string "test" unless a method is specified.
public run ( SimpleReporter $reporter ) : boolean
$reporter SimpleReporter Current test reporter.
return boolean True if all tests passed.
Esempio n. 1
0
 /**
  * Run a test case (usually a group/suite) with the inferred reporter.
  *
  * @param SimpleTestCase $test_case
  * @return void    This method does not return a value.
  *                 Use hasFailures() to query status after running this.
  * @todo Stop creating an individual reporter for each run, in case a client
  * calls this method multiple times.
  */
 function runCase($test_case)
 {
     $reporter = $this->createReporter();
     $test_case->run($reporter);
     $all_tests_passed = $reporter->getStatus();
     if (!$all_tests_passed) {
         $this->_failed_runs++;
     }
 }