Пример #1
0
 public function handle(Suite $e)
 {
     $settings = $e->getSettings();
     if ($settings['error_level']) {
         $this->errorLevel = eval("return {$settings['error_level']};");
     }
     error_reporting($this->errorLevel);
     set_error_handler(array($this, 'errorHandler'));
     register_shutdown_function(array($this, 'shutdownHandler'));
 }
Пример #2
0
 public function beforeSuite(\Codeception\Event\Suite $e)
 {
     $settings = $e->getSettings();
     $this->applySettings($settings);
     $e->getResult()->setCodeCoverage(new \Codeception\PHPUnit\DummyCodeCoverage());
     if (!$this->enabled or $this->remote) {
         return;
     }
     \Codeception\CodeCoverageSettings::setup($this->coverage)->filterWhiteList($settings)->filterBlackList($settings);
     $e->getResult()->setCodeCoverage($this->coverage);
 }
Пример #3
0
 public function beforeSuite(\Codeception\Event\Suite $e)
 {
     $this->applySettings($e->getSettings());
     if (!$this->enabled) {
         return;
     }
     $this->suite_name = $e->getSuite()->getName();
     $this->module = $this->getRemoteConnectionModule();
     if (!$this->module) {
         return;
     }
     if ($this->settings['remote_config']) {
         $this->module->_setHeader('X-Codeception-CodeCoverage-Config', $this->settings['remote_config']);
     }
     $knock = $this->getRemoteCoverageFile($this->module, 'clear');
     if ($knock === false) {
         throw new \Codeception\Exception\RemoteException('
             CodeCoverage Error.
             Check the file "c3.php" is included in your application.
             We tried to access "/c3/report/clear" but this URI was not accessible.
             You can review actual error messages in c3tmp dir.
             ');
     }
 }
Пример #4
0
 public function beforeSuite(Suite $e)
 {
     foreach (\Codeception\SuiteManager::$modules as $module) {
         $module->_beforeSuite($e->getSettings());
     }
 }