diff --git a/pkg/amqp-lib/Tests/AmqpConsumerTest.php b/pkg/amqp-lib/Tests/AmqpConsumerTest.php index 16b59227c..2bd637d94 100644 --- a/pkg/amqp-lib/Tests/AmqpConsumerTest.php +++ b/pkg/amqp-lib/Tests/AmqpConsumerTest.php @@ -27,9 +27,11 @@ public function testShouldImplementConsumerInterface() public function testCouldBeConstructedWithContextAndQueueAsArguments() { - new AmqpConsumer( - $this->createContextMock(), - new AmqpQueue('aName') + self::assertInstanceOf(AmqpConsumer::class, + new AmqpConsumer( + $this->createContextMock(), + new AmqpQueue('aName') + ) ); } diff --git a/pkg/amqp-lib/Tests/AmqpProducerTest.php b/pkg/amqp-lib/Tests/AmqpProducerTest.php index 0bce53361..5746d911a 100644 --- a/pkg/amqp-lib/Tests/AmqpProducerTest.php +++ b/pkg/amqp-lib/Tests/AmqpProducerTest.php @@ -25,7 +25,10 @@ class AmqpProducerTest extends TestCase public function testCouldBeConstructedWithRequiredArguments() { - new AmqpProducer($this->createAmqpChannelMock(), $this->createContextMock()); + self::assertInstanceOf( + AmqpProducer::class, + new AmqpProducer($this->createAmqpChannelMock(), $this->createContextMock()) + ); } public function testShouldImplementProducerInterface() diff --git a/pkg/amqp-lib/Tests/AmqpSubscriptionConsumerTest.php b/pkg/amqp-lib/Tests/AmqpSubscriptionConsumerTest.php index a87349771..a375657b2 100644 --- a/pkg/amqp-lib/Tests/AmqpSubscriptionConsumerTest.php +++ b/pkg/amqp-lib/Tests/AmqpSubscriptionConsumerTest.php @@ -19,7 +19,10 @@ public function testShouldImplementSubscriptionConsumerInterface() public function testCouldBeConstructedWithAmqpContextAndHeartbeatOnTickAsArguments() { - new AmqpSubscriptionConsumer($this->createAmqpContextMock(), $heartbeatOnTick = true); + self::assertInstanceOf( + AmqpSubscriptionConsumer::class, + new AmqpSubscriptionConsumer($this->createAmqpContextMock(), $heartbeatOnTick = true) + ); } /** diff --git a/pkg/amqp-lib/composer.json b/pkg/amqp-lib/composer.json index 3aaaa5bf5..9665a2cca 100644 --- a/pkg/amqp-lib/composer.json +++ b/pkg/amqp-lib/composer.json @@ -7,7 +7,7 @@ "license": "MIT", "require": { "php": "^7.3|^8.0", - "php-amqplib/php-amqplib": "^2.12.1", + "php-amqplib/php-amqplib": "^3.0", "queue-interop/amqp-interop": "^0.8.2", "queue-interop/queue-interop": "^0.8", "enqueue/amqp-tools": "^0.10"