Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00%
0 / 1
0.00%
0 / 6
CRAP
0.00%
0 / 28
Extension
0.00%
0 / 1
0.00%
0 / 6
90
0.00%
0 / 28
 __construct($config, $options)
0.00%
0 / 1
2
0.00%
0 / 6
 events()
0.00%
0 / 1
2
0.00%
0 / 4
 write($message)
0.00%
0 / 1
6
0.00%
0 / 4
 writeln($message)
0.00%
0 / 1
6
0.00%
0 / 4
 getModule($name)
0.00%
0 / 1
6
0.00%
0 / 6
 getSubscribedEvents()
0.00%
0 / 1
2
0.00%
0 / 4
<?php
namespace Codeception\Platform;
use Codeception\Exception\ModuleRequire;
use Codeception\Output;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class Extension implements EventSubscriberInterface {
protected $config;
protected $options;
protected $output;
function __construct($config, $options)
{
$this->config = $config;
$this->options = $options;
$this->output = new Output($options['colors']);
}
static function events()
{
return array();
}
protected function write($message)
{
if (!$this->options['silent']) $this->output->put($message);
}
protected function writeln($message)
{
if (!$this->options['silent']) $this->output->writeln($message);
}
public function getModule($name)
{
if (!isset(\Codeception\SuiteManager::$modules[$name]))
throw new ModuleRequire($name, "module is not enabled");
return \Codeception\SuiteManager::$modules[$name];
}
static function getSubscribedEvents()
{
return self::events();
}