/** * Initialises the client and loads Configuration. * * @param array $args Array of initialisation arguments */ protected function init($args) { $botConfig = $this->getBotConfig($args); if (!$botConfig) { Output::log(new Fatal("Config should be specified!")); } $config = new Config($botConfig); $this->timeout = $config->getTimeout(); $this->executor = Handler::getInstance(); $this->executor->initWithConfig($config); }
public function setUp() { $config = $this->getConfigMock(); $this->handler = Handler::getInstance(); $this->handler->initWithConfig($config); }