Exemplo n.º 1
0
 public function __construct(PHPUnit_Runner_TestSuiteLoader $loader = null, PHP_CodeCoverage_Filter $filter = null)
 {
     $this->coverageRunner = $coverageRunner = CodeCoverageSession::getCached();
     parent::__construct($loader, $filter);
     if (is_file($file = Inspector::getResultFileName())) {
         unlink($file);
     }
     $this->testListener = new TestListener();
     $this->testListener->setCoverage($coverageRunner);
     $this->configureErrorHandler();
 }
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);
 }
Exemplo n.º 3
0
 public function __construct(CodeCoverageSession $coverageSession = null)
 {
     parent::__construct('PhpGuard-Behat');
     $this->coverageSession = CodeCoverageSession::getCached();
 }