OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
Xpress_backup
/
vendor
/
aws
/
aws-sdk-php
/
tests
/
Api
/
Serializer
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/19/2025 10:07:19 AM
rwxr-xr-x
📄
ComplianceTest.php
4.95 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
JsonBodyTest.php
7.41 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
JsonRpcSerializerTest.php
2.97 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
QuerySerializerTest.php
2.85 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
RestJsonSerializerTest.php
12.89 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
RestXmlSerializerTest.php
3.7 KB
05/19/2025 10:07:19 AM
rw-r--r--
Editing: QuerySerializerTest.php
Close
<?php namespace Aws\Test\Api\Serializer; use Aws\Api\Serializer\QuerySerializer; use Aws\Api\Service; use Aws\Command; use Aws\EndpointV2\EndpointDefinitionProvider; use Aws\EndpointV2\EndpointProviderV2; use Aws\EndpointV2\Ruleset\RulesetEndpoint; use Aws\Test\UsesServiceTrait; use PHPUnit\Framework\TestCase; /** * @covers Aws\Api\Serializer\QuerySerializer */ class QuerySerializerTest extends TestCase { use UsesServiceTrait; public function testSerializesEmptyLists() { $service = new Service( [ 'metadata'=> [ 'protocol' => 'query', 'apiVersion' => '1' ], 'operations' => [ 'foo' => [ 'http' => ['httpMethod' => 'POST'], 'input' => [ 'type' => 'structure', 'members' => [ 'baz' => [ 'type' => 'list', 'member' => ['type' => 'string'] ] ] ] ] ] ], function () {} ); $q = new QuerySerializer($service, 'http://foo.com'); $cmd = new Command('foo', ['baz' => []]); $request = $q($cmd); $this->assertSame('POST', $request->getMethod()); $this->assertSame('http://foo.com', (string) $request->getUri()); $this->assertSame('Action=foo&Version=1&baz=', (string) $request->getBody()); } public function testDoesNotOverrideScheme() { $service = new Service( [ 'metadata'=> [ 'protocol' => 'query', 'apiVersion' => '1', 'serviceIdentifier' => 'foo' ], 'operations' => [ 'foo' => [ 'http' => ['httpMethod' => 'POST'], 'input' => [ 'type' => 'structure', 'members' => [ 'baz' => [ 'type' => 'list', 'member' => ['type' => 'string'] ] ] ] ] ] ], function () {} ); $q = new QuerySerializer($service, 'http://foo.com'); $cmd = new Command('foo', ['baz' => []]); $endpoint = new RulesetEndpoint('https://foo.com'); $request = $q($cmd, $endpoint); $this->assertSame('http://foo.com', (string) $request->getUri()); } }