private function processSuite(\DOMElement $suiteEl)
{
$suite = new Suite($suiteEl->getAttribute('context'), new \DateTime($suiteEl->getAttribute('date')), $suiteEl->getAttribute('config-path'), [], [], $suiteEl->getAttribute('uuid'));
$informations = [];
foreach ($suiteEl->query('./env/*') as $envEl) {
$name = $envEl->nodeName;
$info = [];
foreach ($envEl->attributes as $iName => $valueAttr) {
$info[$iName] = $valueAttr->nodeValue;
}
$informations[$name] = new Information($name, $info);
}
$resultClasses = [];
foreach ($suiteEl->query('//result') as $resultEl) {
$class = $resultEl->getAttribute('class');
if (!class_exists($class)) {
throw new \RuntimeException(sprintf('XML file defines a non-existing result class "%s" - maybe you are missing an extension?', $class));
}
$resultClasses[$resultEl->getAttribute('key')] = $class;
}
$suite->setEnvInformations($informations);
foreach ($suiteEl->query('./benchmark') as $benchmarkEl) {
$benchmark = $suite->createBenchmark($benchmarkEl->getAttribute('class'));
$this->processBenchmark($benchmark, $benchmarkEl, $resultClasses);
}
return $suite;
}