Esempio n. 1
0
 public function enrichTokenFile(TokenFileStartEvent $event)
 {
     try {
         $tokenDom = $event->getTokenFile()->asDom();
         $coverageDom = $this->loadCoverageInformation($tokenDom);
         $coverage = $coverageDom->queryOne('//pu:coverage[pu:line]');
         if ($coverage) {
             $container = $this->getEnrichtmentContainer($tokenDom->documentElement, 'phpunit');
             $container->appendChild($tokenDom->importNode($coverage, true));
         }
     } catch (PHPUnitEnricherException $e) {
         // Silently ignore for now
     }
 }
Esempio n. 2
0
 public function enrichTokenFile(TokenFileStartEvent $event)
 {
     $this->genericProcess($event->getTokenFile()->asDom());
 }
Esempio n. 3
0
 public function handleToken(TokenFileStartEvent $event)
 {
     $dom = $event->getTokenFile()->asDom();
     $this->saveDomDocument($dom, $this->outputDir . '/tokens/' . $dom->queryOne('//phpdox:file')->getAttribute('relative') . '.xml');
 }
Esempio n. 4
0
 public function buildSource(TokenFileStartEvent $event)
 {
     $path = $event->getTokenFile()->getRelativeName($this->sourceDir);
     $base = str_repeat('../', count(explode('/', $path)));
     $this->xslSource->setParameter('', 'base', $base);
     $html = $this->xslSource->transformToDoc($event->getTokenFile()->asDom());
     $this->saveDomDocument($html, $this->outputDir . '/source/' . $path . '.' . $this->extension, FALSE);
 }