Used for outputing ParaTest results
Ejemplo n.º 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
  */
 protected 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);
     }
 }
Ejemplo n.º 2
0
 /**
  * Returns whether or not a test has finished being
  * executed. If it has, this method also halts a test process - optionally
  * throwing an exception if a fatal error has occurred -
  * prints feedback, and updates the overall exit code
  *
  * @param ExecutableTest $test
  * @return bool
  * @throws \Exception
  */
 private function testIsStillRunning($test)
 {
     if (!$test->isDoneRunning()) {
         return true;
     }
     $this->setExitCode($test);
     $test->stop();
     if ($this->options->stopOnFailure && $test->getExitCode() > 0) {
         $this->pending = array();
     }
     if (static::PHPUNIT_FATAL_ERROR === $test->getExitCode()) {
         throw new \Exception($test->getStderr());
     }
     $this->printer->printFeedback($test);
     if ($this->hasCoverage()) {
         $this->addCoverage($test);
     }
     return false;
 }