Ejemplo n.º 1
0
 /**
  * @covers ::getAdapter
  * @covers ::<private>
  */
 public function testAmqpAdapterCanBeGenerated()
 {
     $factory = new AdapterFactory();
     $config = new Config(['type' => 'amqp']);
     $this->assertInstanceOf('Hodor\\MessageQueue\\Adapter\\Amqp\\Factory', $factory->getAdapter($config));
 }
Ejemplo n.º 2
0
 /**
  * @return MqFactoryInterface
  */
 private function getMessageQueueAdapterFactory()
 {
     if ($this->mq_adapter_factory) {
         return $this->mq_adapter_factory;
     }
     $mq_adapter_factory = new AdapterFactory();
     $this->mq_adapter_factory = $mq_adapter_factory->getAdapter($this->config->getMessageQueueConfig());
     return $this->mq_adapter_factory;
 }