Skip to content

Commit

Permalink
Update InteractsWithSqs.php
Browse files Browse the repository at this point in the history
  • Loading branch information
amranidev committed Apr 3, 2023
1 parent 8b94c95 commit 3d1d1ba
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions tests/Sqs/Traits/InteractsWithSqs.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
]);
}

Expand All @@ -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',
Expand Down

0 comments on commit 3d1d1ba

Please sign in to comment.