Beispiel #1
0
 protected function addResult($type, PHPUnit_Framework_Test &$test, &$e, $time)
 {
     array_push($this->current_suite()->results->{$type}, (object) array('test' => &$test, 'exception' => &$e, 'time' => $time));
     $this->test->exceptions[] = array('exception' => $e, 'time' => $time);
     $this->runner->print_output($test->getName(), $test->getActualOutput());
     $this->runner->print_status($type);
 }
 /**
  * A test ended.
  *
  * @param  PHPUnit_Framework_Test $test
  * @param  float				  $time
  */
 public function endTest(PHPUnit_Framework_Test $test, $time)
 {
     if ($this->currentTestPass) {
         $this->write(sprintf('test passed in %.3f sec.', $time));
     }
     echo $test->getActualOutput();
 }
 /**
  * A test ended.
  *
  * @param PHPUnit_Framework_Test $test
  * @param float                  $time
  */
 public function endTest(PHPUnit_Framework_Test $test, $time)
 {
     if ($test instanceof PHPUnit_Framework_TestCase) {
         if (!$test->hasPerformedExpectationsOnOutput()) {
             echo $test->getActualOutput();
         }
     }
 }
Beispiel #4
0
 /**
  * @param PHPUnit_Framework_Test $test
  */
 private function writeDiagnostics(PHPUnit_Framework_Test $test)
 {
     if (!$test instanceof PHPUnit_Framework_TestCase) {
         return;
     }
     if (!$test->hasOutput()) {
         return;
     }
     foreach (explode("\n", trim($test->getActualOutput())) as $line) {
         $this->write(sprintf("# %s\n", $line));
     }
 }
 /**
  * A test ended.
  *
  * @param PHPUnit_Framework_Test $test
  * @param float                  $time
  */
 public function endTest(PHPUnit_Framework_Test $test, $time)
 {
     if (!$this->lastTestFailed) {
         $this->writeProgress('.');
     }
     if ($test instanceof PHPUnit_Framework_TestCase) {
         $this->numAssertions += $test->getNumAssertions();
     } elseif ($test instanceof PHPUnit_Extensions_PhptTestCase) {
         $this->numAssertions++;
     }
     $this->lastTestFailed = false;
     if ($test instanceof PHPUnit_Framework_TestCase) {
         if (!$test->hasExpectationOnOutput()) {
             $this->write($test->getActualOutput());
         }
     }
 }
 /**
  * A test ended.
  *
  * @param  PHPUnit_Framework_Test $test
  * @param  float                  $time
  */
 public function endTest(PHPUnit_Framework_Test $test, $time)
 {
     if (!$this->lastTestFailed) {
         $this->writeProgress($this->green('.'));
     }
     if ($test instanceof PHPUnit_Framework_TestCase) {
         $this->numAssertions += $test->getNumAssertions();
     } else {
         if ($test instanceof PHPUnit_Extensions_PhptTestCase) {
             $this->numAssertions++;
         }
     }
     $this->lastTestFailed = FALSE;
     if ($this->verbose && $test instanceof PHPUnit_Framework_TestCase) {
         $this->write($test->getActualOutput());
     }
 }
 /**
  * A test ended.
  *
  * @param PHPUnit_Framework_Test $test Test case
  * @param float                  $time Time taken
  *
  * @return void
  */
 public function endTest(PHPUnit_Framework_Test $test, $time)
 {
     $this->runs[] = array('name' => $test->getName(), 'size' => $test->getSize(), 'status' => $test->getStatus(), 'statusMessage' => $test->getStatusMessage(), 'assertions' => $test->getNumAssertions(), 'result' => $test->getResult(), 'annotations' => $test->getAnnotations(), 'timeTaken' => $time, 'output' => $test->getActualOutput());
 }