function testMkdir() { CoverageUtils::mkdir(dirname(__FILE__)); try { CoverageUtils::mkdir(__FILE__); $this->fail("Should give error about cannot create dir of a file"); } catch (Exception $expected) { } }
public function generate() { CoverageUtils::mkdir($this->reportDir); $index = $this->reportDir . '/index.html'; $hnd = fopen($index, 'w'); $this->generateSummaryReport($hnd); fclose($hnd); foreach ($this->coverage as $file => $cov) { $byFile = $this->reportDir . '/' . self::reportFilename($file); $byFileHnd = fopen($byFile, 'w'); $this->generateCoverageByFile($byFileHnd, $file, $cov); fclose($byFileHnd); } echo "generated report {$index}\n"; }