/** * Get the Connection object in use * * @return ConnectionInterface */ public function getConnection() { return $this->channel->getConnection(); }
public function testCreateQueue() { $queueOptions = $this->prophesize(QueueOptions::class); $queuePrototype = $this->prophesize(Queue::class); $queuePrototype->setChannel(Argument::type(Channel::class))->shouldBeCalled(); $queuePrototype->setOptions($queueOptions->reveal())->shouldBeCalled(); $channel = new Channel(null, $queuePrototype->reveal()); $exchange = $channel->createQueue($queueOptions->reveal()); static::assertInstanceOf(Queue::class, $exchange); }