/** * @covers Gloubster\Server\GloubsterServer::create */ public function testCreate() { $loop = $this->getEventLoop(); $conf = $this->getTestConfiguration(); $logger = $this->getLogger(); GloubsterServer::create($loop, $conf, $logger); }
public function doExecute(InputInterface $input, OutputInterface $output) { $loop = LoopFactory::create(); $server = GloubsterServer::create($loop, $this->conf, $this->container['monolog']); $server->register(new ListenersComponent()); $server->register(new LogBuilderComponent()); $server->register(new RabbitMQMonitorComponent()); $server->register(new ServerMonitorComponent()); $server->register(new WorkerMonitorBroadcastComponent()); if ($input->getOption('test')) { $server->register(new StopComponent()); } $server->run(); }