public function disconnectAll() { if (!$this->channel_manager) { return; } $this->channel_manager->disconnectAll(); }
/** * @return Channel */ private function getChannel() { if ($this->channel) { return $this->channel; } $this->channel = $this->channel_factory->getChannel($this->queue_key); return $this->channel; }
/** * @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'); }