File: ListTopicsInputTest.php

package info (click to toggle)
php-async-aws-sns 1.11.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 516 kB
  • sloc: php: 2,567; makefile: 33
file content (28 lines) | stat: -rw-r--r-- 626 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php

namespace AsyncAws\Sns\Tests\Unit\Input;

use AsyncAws\Core\Test\TestCase;
use AsyncAws\Sns\Input\ListTopicsInput;

class ListTopicsInputTest extends TestCase
{
    public function testRequest(): void
    {
        $input = new ListTopicsInput([
            'NextToken' => 'change me',
        ]);

        // see https://docs.aws.amazon.com/sns/latest/api/API_ListTopics.html
        $expected = <<<TEXT
POST / HTTP/1.0
Content-Type: application/x-www-form-urlencoded

Action=ListTopics
NextToken=change+me
&Version=2010-03-31
TEXT;

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