public function testKeepGettingPendingMessages() { $client =
$this->
createMock(SqsClient::
class);
$client->
expects($this->
any()) ->
method('getQueueUrl'
) ->
with(['QueueName' => 'queue', 'QueueOwnerAWSAccountId' => 123
]) ->
willReturn(ResultMockFactory::
create(GetQueueUrlResult::
class,
['QueueUrl' => 'https://sqs.us-east-2.amazonaws.com/123456789012/MyQueue'
]));
$firstResult = ResultMockFactory::
create(ReceiveMessageResult::
class,
['Messages' =>
[ new Message(['MessageId' => 1, 'Body' => 'this is a test'
]),
new Message(['MessageId' => 2, 'Body' => 'this is a test'
]),
new Message(['MessageId' => 3, 'Body' => 'this is a test'
]),
]]);
$secondResult = ResultMockFactory::
create(ReceiveMessageResult::
class,
['Messages' =>
[]]);
$series =
[ [[['QueueUrl' => 'https://sqs.us-east-2.amazonaws.com/123456789012/MyQueue',
'VisibilityTimeout' => null,
'MaxNumberOfMessages' => 9,
'MessageAttributeNames' =>
['All'
],
'WaitTimeSeconds' => 20
]],
$firstResult],
[[[