Method | Description | |
---|---|---|
analyze ( object $report, array $classes = [] ) : array | Analyzes code coverage results collected from XDebug, and performs coverage density analysis. | |
apply ( object $report, array $tests, array $options = [] ) : object | Takes an instance of an object (usually a Collection object) containing test instances. Attaches code coverage filtering to test cases. | |
collect ( array $filterResults, array $options = [] ) : array | Collects code coverage analysis results from xdebug_get_code_coverage(). | |
collectLines ( array $result ) : array | Takes the raw line numbers and returns results with the code from uncovered lines included. |
Method | Description | |
---|---|---|
_density ( array $runs, array $classMap = [] ) : array | Reduces the results of multiple XDebug code coverage runs into a single 2D array of the aggregate line coverage density per file. |
protected static _density ( array $runs, array $classMap = [] ) : array | ||
$runs | array | An array containing multiple runs of raw XDebug coverage data, where each array key is a file name, and its value is XDebug's coverage data for that file. |
$classMap | array | An optional map with class names as array keys and corresponding file names as values. Used to filter the returned results, and will cause the array keys of the results to be class names instead of file names. |
return | array |
public static analyze ( object $report, array $classes = [] ) : array | ||
$report | object | The report instance running this filter and aggregating results |
$classes | array | A list of classes to analyze coverage on. By default, gets all defined subclasses of lithium\test\Unit which are currently in memory. |
return | array | Returns an array indexed by file and line, showing the number of instances each line was called. |
public static apply ( object $report, array $tests, array $options = [] ) : object | ||
$report | object | Instance of Report which is calling apply. |
$tests | array | The test to apply this filter on |
$options | array | Options for how code coverage should be applied. These options are also passed to `Coverage::collect()` to determine how to aggregate results. See the documentation for `collect()` for further options. Options affecting this method are: -'method': The name of method to attach to, defaults to 'run'. |
return | object | Returns the instance of `$tests` with code coverage analysis triggers applied. |
public static collectLines ( array $result ) : array | ||
$result | array | The raw line number results |
return | array |