/** * Tests setEventQueueFactory(). */ public function testSetEventQueueFactory() { $queueFactory = Phake::mock('\\Phergie\\Irc\\Bot\\React\\EventQueueFactoryInterface'); $this->plugin->setEventQueueFactory($queueFactory); $this->assertSame($queueFactory, $this->plugin->getEventQueueFactory()); }
/** * Set Event Queue Factory * @param EventQueueFactoryInterface $queueFactory */ public function setEventQueueFactory(EventQueueFactoryInterface $queueFactory) { parent::setEventQueueFactory($queueFactory); foreach ($this->plugins as $plugin) { if (!$plugin instanceof EventQueueFactoryAwareInterface) { continue; } $plugin->setEventQueueFactory($queueFactory); } }