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