PHPUnit_TextUI_ResultPrinter::endTest PHP Method

endTest() public method

A test ended.
public endTest ( PHPUnit_Framework_Test $test, float $time )
$test PHPUnit_Framework_Test
$time float
    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_Runner_PhptTestCase) {
            $this->numAssertions++;
        }
        $this->lastTestFailed = false;
        if ($test instanceof PHPUnit_Framework_TestCase) {
            if (!$test->hasExpectationOnOutput()) {
                $this->write($test->getActualOutput());
            }
        }
    }

Usage Example

Exemplo n.º 1
0
 /**
  * A test ended.
  *
  * @param  PHPUnit_Framework_Test $test
  * @param  float				  $time
  */
 public function endTest(\PHPUnit_Framework_Test $test, $time)
 {
     parent::endTest($test, $time);
     if ($test instanceof \Pagosoft\PSpec\Test) {
         $this->numAssertions += $test->getNumAssertions();
     }
 }
All Usage Examples Of PHPUnit_TextUI_ResultPrinter::endTest