コード例 #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());
     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');
         }
     }
 }
コード例 #2
0
ファイル: ResultPrinter.php プロジェクト: brianium/paratest
 /**
  * Process reader feedback and print it.
  *
  * @param  Reader $reader
  * @param  int    $expectedTestCount
  */
 protected function processReaderFeedback($reader, $expectedTestCount)
 {
     $feedbackItems = $reader->getFeedback();
     $actualTestCount = count($feedbackItems);
     $this->processTestOverhead($actualTestCount, $expectedTestCount);
     foreach ($feedbackItems as $item) {
         $this->printFeedbackItem($item);
     }
     if ($this->processSkipped) {
         $this->printSkippedAndIncomplete($actualTestCount, $expectedTestCount);
     }
 }