lithium\test\filter\Profiler::collect()
Collects the raw filter results and packages them for analysis.
Parameters
-
array
$filterResults
The results of the filter on the test run.
Returns
arrayThe packaged filter results prepared for analysis.
Source
public static function collect($filterResults) {
$defaults = array('test' => null);
$classMap = array();
$packagedResults = array();
foreach ($filterResults as $results) {
$class = key($results);
$options = $results['options'];
$options += $defaults;
$method = $results['method'];
$classMap[$options['test']] = $class;
if (!isset($packagedResults[$class])) {
$packagedResults[$class] = array();
}
$packagedResults[$class][$method] = $results[$class];
}
$filterResults = $packagedResults;
return array(
'filterResults' => $filterResults,
'classMap' => $classMap
);
}