Generates code coverage reports in Simple plain text from data obtained from PHPUnit
TextCoverageReport generateDiff( string $filename , array $fileLines , array $coverageData )
Generates a 'diff' report for a file. Since diffs are too big for plain text reports a simple file => % covered is done.
$filename $fileLines $coverageData stringreport( )
Generates report text to display.
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-TextCoverageReport.html