PHPUnit_Framework_TestResult::getCodeCoverage PHP Method

getCodeCoverage() public method

Returns the code coverage object.
public getCodeCoverage ( ) : SebastianBergmann\CodeCoverage\CodeCoverage
return SebastianBergmann\CodeCoverage\CodeCoverage
    public function getCodeCoverage()
    {
        return $this->codeCoverage;
    }

Usage Example

 public function endTestRun()
 {
     $coverage = $this->result->getCodeCoverage();
     if (!empty($coverage)) {
         $clover = new PHP_CodeCoverage_Report_Clover();
         $contents = $clover->process($coverage);
         if ($this->out) {
             $this->out->write($contents);
             $this->out->close();
         }
     }
     parent::endTestRun();
 }
All Usage Examples Of PHPUnit_Framework_TestResult::getCodeCoverage