From 3d1d1ba63db1338bfe3d006429100374531f562b Mon Sep 17 00:00:00 2001 From: Houssain Amrani Date: Mon, 3 Apr 2023 01:32:32 +0000 Subject: [PATCH] Update InteractsWithSqs.php --- tests/Sqs/Traits/InteractsWithSqs.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/Sqs/Traits/InteractsWithSqs.php b/tests/Sqs/Traits/InteractsWithSqs.php index 28ce88e..8aae1e5 100644 --- a/tests/Sqs/Traits/InteractsWithSqs.php +++ b/tests/Sqs/Traits/InteractsWithSqs.php @@ -26,14 +26,9 @@ public function sendMessage($message) $client->createQueue(['QueueName' => $queueName]); $client->purgeQueue(['QueueUrl' => $queueEndpoint]); - $decoded_message = json_decode($message, true); - $decoded_message['Message'] = serialize($decoded_message['Message']); - - $messageToSend = json_encode($decoded_message); - $client->sendMessage([ 'QueueUrl' => $queueEndpoint, - 'MessageBody' => $messageToSend, + 'MessageBody' => $message, ]); } @@ -47,7 +42,7 @@ protected function makeSqsClient(): SqsClient $client = new SqsClient([ 'endpoint' => 'http://localhost:4566', 'version' => 'latest', - 'region' => 'local', + 'region' => 'us-east-1', 'credentials' => [ 'key' => 'foo', 'secret' => 'bar',