public function process()
{
$testCases = array();
$time = array();
$dom = new \DOMDocument();
$dom->loadXML($this->log);
$xpath = new \DOMXPath($dom);
$elements = $xpath->query('//testcase');
foreach ($elements as $key => $case) {
if (!isset($testCases[$case->getAttribute('class')])) {
$testCases[$case->getAttribute('class')] = array('file' => $case->getAttribute('file'), 'time' => 0);
}
$testCases[$case->getAttribute('class')]['time'] += (double) $case->getAttribute('time');
}
unset($xpath);
foreach ($testCases as $key => $value) {
$time[$key] = $value['time'];
}
array_multisort($time, SORT_ASC, $testCases);
return $testCases;
}