Skip to content

Commit

Permalink
Add missing SQS AddPermission test
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenbrookes committed Oct 1, 2024
1 parent 93cc4c1 commit 98c79d8
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/Service/Sqs/tests/Unit/Input/AddPermissionRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,26 @@ class AddPermissionRequestTest extends TestCase
{
public function testRequest(): void
{
self::fail('Not implemented');

$input = new AddPermissionRequest([
'QueueUrl' => 'change me',
'Label' => 'change me',
'AWSAccountIds' => ['change me'],
'Actions' => ['change me'],
'QueueUrl' => 'https://sqs.us-east-1.amazonaws.com/177715257436/MyQueue/',
'Label' => 'MyLabel',
'AWSAccountIds' => ["177715257436", "111111111111"],
'Actions' => ["SendMessage", "ReceiveMessage"],
]);

// see https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_AddPermission.html
$expected = '
POST / HTTP/1.0
Content-Type: application/x-amz-json-1.0
x-amz-target: AmazonSQS.AddPermission
Accept: application/json
{
"change": "it"
}
';
"QueueUrl": "https://sqs.us-east-1.amazonaws.com/177715257436/MyQueue/",
"Label": "MyLabel",
"Actions": ["SendMessage", "ReceiveMessage"],
"AWSAccountIds": ["177715257436", "111111111111"]
}';

self::assertRequestEqualsHttpRequest($expected, $input->request());
}
Expand Down

0 comments on commit 98c79d8

Please sign in to comment.