Esempio n. 1
0
 /**
  * Prints the individual "quick" feedback for run
  * tests, that is the ".EF" items
  *
  * @param ExecutableTest $test
  */
 public function printFeedback(ExecutableTest $test)
 {
     $reader = new Reader($test->getTempFile());
     $this->results->addReader($reader);
     $feedbackItems = $reader->getFeedback();
     foreach ($feedbackItems as $item) {
         $this->printFeedbackItem($item);
     }
 }
Esempio n. 2
0
 /**
  * Prints the individual "quick" feedback for run
  * tests, that is the ".EF" items
  *
  * @param ExecutableTest $test
  */
 public function printFeedback(ExecutableTest $test)
 {
     $reader = new Reader($test->getTempFile());
     if (!$reader->hasResults()) {
         throw new \RuntimeException("Log file " . $test->getTempFile() . " is empty.\n                This means a PHPUnit process was unable to run " . $test->getPath() . "\n                Maybe there is more than one class in this file.");
     }
     $this->results->addReader($reader);
     $feedbackItems = $reader->getFeedback();
     $dataProviderOverhead = count($feedbackItems) - $test->getTestMethodCount();
     $this->totalCases += $dataProviderOverhead;
     foreach ($feedbackItems as $item) {
         $this->printFeedbackItem($item);
     }
     $warnings = $test->getWarnings();
     if ($warnings) {
         $this->addWarnings($warnings);
         foreach ($warnings as $warning) {
             $this->printFeedbackItem('W');
         }
     }
 }
Esempio n. 3
0
 /**
  * Prints the individual "quick" feedback for run
  * tests, that is the ".EF" items
  *
  * @param ExecutableTest $test
  */
 public function printFeedback(ExecutableTest $test)
 {
     try {
         $reader = new Reader($test->getTempFile());
     } catch (\InvalidArgumentException $e) {
         throw new \RuntimeException(sprintf("%s\n" . "The process: %s\n" . "This means a PHPUnit process was unable to run \"%s\"\n", $e->getMessage(), $test->getLastCommand(), $test->getPath()));
     }
     if (!$reader->hasResults()) {
         throw new \RuntimeException(sprintf("The process: %s\nLog file \"%s\" is empty.\n" . "This means a PHPUnit process was unable to run \"%s\"\n" . "Maybe there is more than one class in this file.", $test->getLastCommand(), $test->getTempFile(), $test->getPath()));
     }
     $this->results->addReader($reader);
     $this->processReaderFeedback($reader, $test->getTestCount());
     $this->printTestWarnings($test);
 }