ParaTest\Runners\PHPUnit\ResultPrinter::addTest PHP Method

addTest() public method

Adds an ExecutableTest to the tracked results
public addTest ( ParaTest\Runners\PHPUnit\ExecutableTest $suite )
$suite ParaTest\Runners\PHPUnit\ExecutableTest
    public function addTest(ExecutableTest $suite)
    {
        $this->suites[] = $suite;
        $increment = $suite->getTestCount();
        $this->totalCases = $this->totalCases + $increment;
        return $this;
    }

Usage Example

Example #1
0
 /**
  * Builds the collection of pending ExecutableTest objects
  * to run. If functional mode is enabled $this->pending will
  * contain a collection of TestMethod objects instead of Suite
  * objects
  */
 private function load()
 {
     $loader = new SuiteLoader($this->options);
     $loader->load($this->options->path);
     $executables = $this->options->functional ? $loader->getTestMethods() : $loader->getSuites();
     $this->pending = array_merge($this->pending, $executables);
     foreach ($this->pending as $pending) {
         $this->printer->addTest($pending);
     }
 }