From 124013bc983f195b508f2f027dc1f7626da1d2f7 Mon Sep 17 00:00:00 2001 From: DenisYaschuk Date: Thu, 26 Oct 2023 17:23:38 +0100 Subject: [PATCH] AMQP pipeline fix --- tests/Broker/QueueTest.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/tests/Broker/QueueTest.php b/tests/Broker/QueueTest.php index 5192735..75cc829 100644 --- a/tests/Broker/QueueTest.php +++ b/tests/Broker/QueueTest.php @@ -71,7 +71,25 @@ public function testPopReturnsNullWhenNoMessages() public function testPopReturnsMessageWhenMessageInQueue(): void { $this->amqpQueue->shouldReceive('get') - ->andReturn(Mockery::mock(new AMQPEnvelope())) + ->andReturn(Mockery::mock(AMQPEnvelope::class, [ + 'getAppId' => 'app-id', + 'getBody' => 'body', + 'getContentEncoding' => 'content-encoding', + 'getContentType' => 'content-type', + 'getDeliveryMode' => 1, + 'getDeliveryTag' => 'delivery-tag', + 'getExchangeName' => 'exchange-name', + 'getExpiration' => 'expiration', + 'getHeaders' => [], + 'getMessageId' => 'message-id', + 'getPriority' => 'priority', + 'isRedelivery' => false, + 'getReplyTo' => 'reply-to', + 'getRoutingKey' => 'routing-key', + 'getTimestamp' => 'timestamp', + 'getType' => 'type', + 'getUserId' => 'user-id', + ])) ->once(); $message = $this->queue->pop();