Exemplo n.º 1
0
 /**
  * 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);
 }
Exemplo n.º 2
0
 public function setUp()
 {
     $config = $this->getConfigMock();
     $this->handler = Handler::getInstance();
     $this->handler->initWithConfig($config);
 }