Phergie\Irc\Bot\React\Bot::getEventQueueFactory PHP Method

getEventQueueFactory() public method

Returns the event queue factory in use by the bot.
public getEventQueueFactory ( ) : Phergie\Irc\Bot\React\EventQueueFactoryInterface
return Phergie\Irc\Bot\React\EventQueueFactoryInterface
    public function getEventQueueFactory()
    {
        if (!$this->queueFactory) {
            $this->queueFactory = new EventQueueFactory();
        }
        return $this->queueFactory;
    }

Usage Example

Exemplo n.º 1
0
 /**
  * Tests that dependencies can be overridden via configuration.
  */
 public function testOverrideDependencies()
 {
     $client = $this->getMockClient();
     $logger = $this->getMockLogger();
     $parser = $this->getMockParser();
     $converter = $this->getMockConverter();
     $eventQueueFactory = $this->getMockEventQueueFactory();
     $config = array('client' => $client, 'logger' => $logger, 'parser' => $parser, 'converter' => $converter, 'eventQueueFactory' => $eventQueueFactory, 'plugins' => array(), 'connections' => array($this->getMockConnection()));
     $this->bot->setConfig($config);
     $this->bot->run();
     $this->assertSame($client, $this->bot->getClient());
     $this->assertSame($logger, $this->bot->getLogger());
     $this->assertSame($parser, $this->bot->getParser());
     $this->assertSame($converter, $this->bot->getConverter());
     $this->assertSame($eventQueueFactory, $this->bot->getEventQueueFactory());
 }
All Usage Examples Of Phergie\Irc\Bot\React\Bot::getEventQueueFactory