TextReporter::paintFooter PHP Method

paintFooter() public method

Paints the end of the test with a summary of the passes and failures.
public paintFooter ( string $test_name )
$test_name string Name class of test.
    public function paintFooter($test_name)
    {
        if ($this->getFailCount() + $this->getExceptionCount() === 0) {
            print "OK\n";
        } else {
            print "FAILURES!!!\n";
        }
        print 'Test cases run: ' . $this->getTestCaseProgress() . '/' . $this->getTestCaseCount() . ', Passes: ' . $this->getPassCount() . ', Failures: ' . $this->getFailCount() . ', Exceptions: ' . $this->getExceptionCount() . "\n";
    }

Usage Example

 /**
  * Paints the end of the test with a summary of
  * the passes and failures.
  *
  * @param string $test_name Name class of test.
  * @access public
  */
 function paintFooter($test_name)
 {
     parent::paintFooter($test_name);
     echo 'Time taken by tests (in seconds): ' . $this->_timeDuration . "\n";
     if (function_exists('memory_get_peak_usage')) {
         echo 'Peak memory use: (in bytes): ' . number_format(memory_get_peak_usage()) . "\n";
     }
 }
All Usage Examples Of TextReporter::paintFooter