/**
  * @return PhpGuardExtension
  */
 private function getExtension()
 {
     $runner = new \PhpGuard\Application\Bridge\CodeCoverage\CodeCoverageSession();
     $container = new ServiceContainer();
     $container->set('coverage.session', $runner);
     $extension = new PhpGuardExtension();
     $extension->load($container);
     return $extension;
 }
Exemplo n.º 2
0
 protected function loadConfigurationFile(InputInterface $input, ServiceContainer $container)
 {
     $container->setShared('event_dispatcher.listeners.phpguard', function ($c) {
         $ext = new PhpGuardExtension();
         if ($runner = CodeCoverageSession::getCached()) {
             $ext->setCoverageRunner($runner);
         }
         $ext->load($c);
         return $ext;
     });
     parent::loadConfigurationFile($input, $container);
 }