Skip to content

Commit

Permalink
AMQP pipeline fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisYaschuk committed Oct 26, 2023
1 parent d75960e commit 124013b
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion tests/Broker/QueueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 124013b

Please sign in to comment.