/** * Runs all combinations and returns results grouped by method name. * * @return UnitResult */ public function run() { $this->result = new UnitResult(); Out::writeLine('Unit: ' . $this->getName()); foreach ($this->methods as $method) { $this->fetchMethodResults($method); } $this->sortByMethodScore(); return $this->result; }
/** * @param $data */ private function render($data) { $outputDir = $this->config['output_dir']; if (!is_dir($outputDir)) { mkdir($outputDir, 0777, true); } $path = Path::join($outputDir, 'index.html'); Out::writeLine('Saving HTML report to ' . $path); $html = $this->twig->render('report.twig', $data); file_put_contents($path, $html); }