public function getCoverageFileName() { if ($this->currentlyExecuting !== null) { return $this->currentlyExecuting->getCoverageFileName(); } else { return null; } }
/** * @param ExecutableTest $test */ private function addCoverage($test) { $coverageFile = $test->getCoverageFileName(); if (!file_exists($coverageFile)) { return; } if (filesize($coverageFile) == 0) { throw new \RuntimeException("Coverage file {$coverageFile} is empty. This means a PHPUnit process has crashed."); } $this->getCoverage()->addCoverage($this->getCoverageObject($coverageFile)); unlink($coverageFile); }
/** * @param ExecutableTest $test */ private function addCoverage(ExecutableTest $test) { $coverageFile = $test->getCoverageFileName(); $this->getCoverage()->addCoverageFromFile($coverageFile); }