/** * Get the Connection object in use * * @return ConnectionInterface */ public function getConnection() { return $this->channel->getConnection(); }
public function testGetConnection() { $connection = $this->prophesize(Connection::class); $adapter = $this->prophesize(PhpAmqpLib::class); $channel = new Channel(); $channel->setConnection($connection->reveal()); static::assertSame($connection->reveal(), $channel->getConnection()); }