Ejemplo n.º 1
0
 private function loadXML($fname)
 {
     try {
         $fname = $this->config->getCoveragePath() . '/' . $fname;
         if (!file_exists($fname)) {
             throw new EnricherException(sprintf('PHPLoc xml file "%s" not found.', $fname), EnricherException::LoadError);
         }
         $dom = new fDOMDocument();
         $dom->load($fname);
         $dom->registerNamespace('pu', 'http://schema.phpunit.de/coverage/1.0');
         return $dom;
     } catch (fDOMException $e) {
         throw new EnricherException('Parsing PHPLoc xml file failed: ' . $e->getMessage(), EnricherException::LoadError);
     }
 }
Ejemplo n.º 2
0
 /**
  * @param PHPUnitConfig $config
  *
  * @throws EnricherException
  */
 public function __construct(PHPUnitConfig $config)
 {
     $this->coveragePath = $config->getCoveragePath();
     $this->index = $this->loadXML('index.xml');
 }