protected function createConsumer($name) { $conf = $this->config['consumers'][$name]; $conn = $this->connFactory->getConnection($conf['connection']); $consumer = new Consumer(new AMQPChannel($conn)); $consumer->setQueueOptions($conf['queue_options']); $this->consumers[$name] = $consumer; return $consumer; }
/** * @expectedException \InvalidArgumentException */ public function testThrowsExceptionOnUnknownConnection() { $cf = new ConnectionFactory([]); $cf->getConnection('someName'); }