Generates code coverage reports in HTML from data obtained from PHPUnit
HtmlCoverageReport _guessSubjectName( ReflectionClass $testReflection )
Guess the class name the test was for based on the test case filename.
$testReflection string_paintLine( string $line , integer $linenumber , string $class , array $coveringTests )
Renders the HTML for a single line in the HTML diff.
$line $linenumber $class $coveringTests stringcoverageHeader( string $filename , string $percent )
Generate an HTML snippet for coverage headers
$filename $percent stringcoverageScript( )
generate some javascript for the coverage report.
stringgenerateDiff( string $filename , array $fileLines , array $coverageData )
Generates an HTML diff for $file based on $coverageData.
Handles both PHPUnit3.5 and 3.6 formats.
3.5 uses -1 for uncovered, and -2 for dead. 3.6 uses array() for uncovered and null for dead.
$filename $fileLines $coverageData string__construct( array $coverage , CakeBaseReporter $reporter )
Constructor
$coverage CakeBaseReporter $reporter _calculateCoveredLines( array $fileLines , array $coverageData )
Calculates how many lines are covered and what the total number of executable lines is.
Handles both PHPUnit3.5 and 3.6 formats.
3.5 uses -1 for uncovered, and -2 for dead. 3.6 uses array() for uncovered and null for dead.
$fileLines $coverageData array_setParams( CakeBaseReporter $reporter )
Pulls params out of the reporter.
CakeBaseReporter $reporter filterCoverageDataByPath( string $path )
Filters the coverage data by path. Files not in the provided path will be removed.
$path arraygetPathFilter( )
Gets the base path that the files we are interested in live in.
stringsetCoverage( array $coverage )
Set the coverage data array
$coverage protected array
Array of test case file names. Used to do basename() matching with files that have coverage to decide which results to show on page load.
array()
© 2005–2016 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
http://api.cakephp.org/2.7/class-HtmlCoverageReport.html