Пример #1
0
 /**
  * @return Channel
  */
 private function getChannel()
 {
     if ($this->channel) {
         return $this->channel;
     }
     $this->channel = $this->channel_factory->getChannel($this->queue_key);
     return $this->channel;
 }
Пример #2
0
 /**
  * @covers ::__construct
  * @covers ::getChannel
  * @covers ::<private>
  * @dataProvider provideRequiredQueueConfigOptions
  * @param string $config_key
  * @expectedException LogicException
  */
 public function testAnExceptionIsThrownIfAnyRequiredConfigElementsAreMissing($config_key)
 {
     $all_queues = $this->getTestQueues();
     $queue = $all_queues['fast_jobs'];
     unset($queue[$config_key]);
     $config = $this->getTestConfig(['fast_jobs' => $queue]);
     $channel_factory = new ChannelFactory($config);
     $channel_factory->getChannel('fast_jobs');
 }