OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
reader
/
aws-ses
/
vendor
/
aws
/
aws-sdk-php
/
tests
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📄
AbstractConfigurationProviderTest.php
3.42 KB
05/19/2025 10:07:15 AM
rw-r--r--
📁
Api
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📁
Arn
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📁
Auth
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📄
AwsClientTest.php
29.67 KB
05/19/2025 10:07:15 AM
rw-r--r--
📁
Build
-
03/03/2025 08:45:25 AM
rwxr-xr-x
📄
ClientResolverTest.php
55.74 KB
05/19/2025 10:07:15 AM
rw-r--r--
📁
ClientSideMonitoring
-
05/19/2025 10:07:14 AM
rwxr-xr-x
📁
CloudFront
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📁
CloudSearchDomain
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📁
CloudTrail
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📁
CloudWatchLogs
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📁
CognitoIdentity
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📁
CognitoSync
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📄
CommandPoolTest.php
5.8 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
CommandTest.php
3.28 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
ConfigurationResolverTest.php
12.35 KB
05/19/2025 10:07:15 AM
rw-r--r--
📁
Credentials
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📁
Crypto
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📁
DefaultsMode
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📁
DocDb
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📄
DoctrineCacheAdapterTest.php
1.23 KB
05/19/2025 10:07:15 AM
rw-r--r--
📁
DynamoDb
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📁
Ec2
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📁
ElasticLoadBalancingV2
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📁
Endpoint
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📁
EndpointDiscovery
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📄
EndpointParameterMiddlewareTest.php
9.21 KB
05/19/2025 10:07:14 AM
rw-r--r--
📁
EndpointV2
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📁
EventBridge
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📁
Exception
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📄
FunctionsTest.php
14.33 KB
05/19/2025 10:07:15 AM
rw-r--r--
📁
Glacier
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📁
Handler
-
03/03/2025 08:45:27 AM
rwxr-xr-x
📄
HandlerListTest.php
7.16 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
HasMonitoringEventsTraitTest.php
895 bytes
05/19/2025 10:07:15 AM
rw-r--r--
📄
HashingStreamTest.php
1.41 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
HistoryTest.php
4.2 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
IdempotencyTokenMiddlewareTest.php
2.76 KB
05/19/2025 10:07:15 AM
rw-r--r--
📁
Identity
-
03/03/2025 08:45:27 AM
rwxr-xr-x
📄
InputValidationMiddlewareTest.php
5.62 KB
05/19/2025 10:07:15 AM
rw-r--r--
📁
Integ
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📄
JsonCompilerTest.php
730 bytes
05/19/2025 10:07:14 AM
rw-r--r--
📁
Lambda
-
05/19/2025 10:07:14 AM
rwxr-xr-x
📁
LexModelsV2
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📄
LruArrayCacheTest.php
1.59 KB
05/19/2025 10:07:15 AM
rw-r--r--
📁
MachineLearning
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📄
MiddlewareTest.php
16.08 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
MockHandlerTest.php
3.79 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
MultiRegionClientTest.php
5.41 KB
05/19/2025 10:07:15 AM
rw-r--r--
📁
Multipart
-
05/19/2025 10:07:14 AM
rwxr-xr-x
📁
Neptune
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📄
PerformanceContext.php
8.2 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
PhpHashTest.php
1.33 KB
05/19/2025 10:07:15 AM
rw-r--r--
📁
Polly
-
05/19/2025 10:07:14 AM
rwxr-xr-x
📄
PresignUrlMiddlewareTest.php
3.95 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
Psr16CacheAdapterTest.php
1.84 KB
05/19/2025 10:07:14 AM
rw-r--r--
📄
PsrCacheAdapterTest.php
2.64 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
QueryCompatibleInputMiddlewareTest.php
9.1 KB
05/19/2025 10:07:14 AM
rw-r--r--
📁
Rds
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📁
RequestCompression
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📄
ResultPaginatorTest.php
16.21 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
ResultTest.php
1.38 KB
05/19/2025 10:07:15 AM
rw-r--r--
📁
Retry
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📄
RetryMiddlewareTest.php
24.57 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
RetryMiddlewareV2Test.php
40.33 KB
05/19/2025 10:07:15 AM
rw-r--r--
📁
Route53
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📁
S3
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📁
S3Control
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📁
Script
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📄
SdkTest.php
2.37 KB
05/19/2025 10:07:15 AM
rw-r--r--
📁
Ses
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📁
Signature
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📁
Sqs
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📁
Ssm
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📄
StreamRequestPayloadMiddlewareTest.php
10.1 KB
05/19/2025 10:07:14 AM
rw-r--r--
📁
Sts
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📄
TestServiceTrait.php
3.78 KB
05/19/2025 10:07:15 AM
rw-r--r--
📁
Token
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📄
TraceMiddlewareTest.php
16.16 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
UsesServiceTrait.php
4.37 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
WaiterTest.php
12.63 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
WrappedHttpHandlerTest.php
13.8 KB
05/19/2025 10:07:15 AM
rw-r--r--
📁
bootstrap
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📄
bootstrap.php
1.53 KB
05/19/2025 10:07:15 AM
rw-r--r--
📁
fixtures
-
03/03/2025 08:45:27 AM
rwxr-xr-x
📁
static
-
03/03/2025 08:39:08 AM
rwxr-xr-x
Editing: QueryCompatibleInputMiddlewareTest.php
Close
<?php namespace Aws\Test; use Aws\AwsClient; use Aws\Command; use Aws\Api\Service; use Aws\Middleware; use Aws\MockHandler; use Aws\Result; use Yoast\PHPUnitPolyfills\TestCases\TestCase; /** * @covers \Aws\QueryCompatibleInputMiddleware */ class QueryCompatibleInputMiddlewareTest extends TestCase { /** * @dataProvider getInputs() * * @param $inputParam * @param $inputValue * @param $expected * @param $type */ public function testEmitsWarning($inputParam, $inputValue, $expected, $type) { $this->expectWarning(); $this->expectWarningMessage( "The provided type for `{$inputParam}` value was `" . (gettype($inputValue) === 'double' ? 'float' : gettype($inputValue)) . "`. The modeled type is `{$type}`." ); $service = $this->generateTestService(); $client = $this->generateTestClient($service); $command = $client->getCommand( 'FooOperation', [$inputParam => $inputValue] ); $client->execute($command); } /** * @dataProvider getInputs() * * @param $inputParam * @param $inputValue * @param $expected */ public function testAppliesMiddlewareAndCastsValues($inputParam, $inputValue, $expected) { $service = $this->generateTestService(); $client = $this->generateTestClient($service); $command = $client->getCommand( 'FooOperation', [$inputParam => $inputValue] ); $command->getHandlerList()->appendValidate(Middleware::tap( function (Command $command) use ($inputParam, $expected) { $this->assertSame($expected, $command[$inputParam]); } ) ); $result = @$client->execute($command); } /** * Data provider for providing top-level command arguments * * @return array */ public function getInputs() { return [ ['IntParam', '10', 10, 'integer'], ['LongParam', '1000000000000000000000000', 1.0E+24, 'long'], ['FloatParam', '10.0', 10.0, 'float'], ['StringParam', 1234, '1234', 'string'], ['StringParam', 15.5, '15.5', 'string'], ['StringParam', 1000000000000000000000000, '1.0E+24', 'string'] ]; } public function testCastsNestedValues() { $input = [ 'MapParam' => [ 'Key1' => [ 'DataType' => 123, 'StringValue' => 456 ] ], 'StructureParam' => [ 'NestedParam1' => 5.5, 'NestedParam2' => '98765' ], 'ListParam' => [ [ 'NestedParam1' => '10', 'NestedParam2' => 20 ] ] ]; $service = $this->generateTestService(); $client = $this->generateTestClient($service); $command = $client->getCommand( 'FooOperation', $input ); $command->getHandlerList()->prependBuild(Middleware::tap(function (Command $command) { $this->assertIsString($command['MapParam']['Key1']['DataType']); $this->assertEquals('123', $command['MapParam']['Key1']['DataType']); $this->assertIsString($command['MapParam']['Key1']['StringValue']); $this->assertEquals('456', $command['MapParam']['Key1']['StringValue']); $this->assertIsString($command['StructureParam']['NestedParam1']); $this->assertEquals('5.5', $command['StructureParam']['NestedParam1']); $this->assertIsInt($command['StructureParam']['NestedParam2']); $this->assertEquals(98765, $command['StructureParam']['NestedParam2']); $this->assertIsInt($command['ListParam'][0]['NestedParam1']); $this->assertEquals(10, $command['ListParam'][0]['NestedParam1']); $this->assertIsString($command['ListParam'][0]['NestedParam2']); $this->assertEquals('20', $command['ListParam'][0]['NestedParam2']); })); @$client->execute($command); } public function testMiddlewareAppliedForQueryCompatClients() { $client = $this->generateTestClient($this->generateTestService()); $list = $client->getHandlerList(); $this->assertStringContainsString('query-compatible-input', $list->__toString()); } public function testMiddlewareNotAppliedForNonQueryCompatClients() { $client = $this->generateTestClient($this->generateTestService(false)); $list = $client->getHandlerList(); $this->assertStringNotContainsString('query-compatible-input', $list->__toString()); } private function generateTestClient(Service $service, $args = []) { return new AwsClient( array_merge( [ 'service' => 'foo', 'api_provider' => function () use ($service) { return $service->toArray(); }, 'region' => 'us-east-1', 'version' => 'latest', 'handler' => new MockHandler([new Result([])]) ], $args ) ); } private function generateTestService($queryCompatible = true) { return new Service( [ 'metadata' => [ "protocol" => "json", "apiVersion" => "2014-01-01", "jsonVersion" => "1.1", "awsQueryCompatible" => $queryCompatible ? [] : null ], 'operations' => [ 'FooOperation' => [ 'http' => [ 'requestUri' => '/', 'httpMethod' => 'POST' ], 'input' => [ 'type' => 'structure', 'members' => [ 'StringParam' => [ 'type' => 'string', ], 'IntParam' => [ 'type' => 'integer', ], 'LongParam' => [ 'type' => 'long', ], 'FloatParam' => [ 'type' => 'float', ], 'MapParam' => [ 'type' => 'map', 'key' => [ 'type' => 'string' ], 'value' => [ 'type' => 'structure', 'members' => [ 'DataType' => [ 'type' => 'string', ], 'StringValue' => [ 'type' => 'string', ] ] ] ], 'StructureParam' => [ 'type' => 'structure', 'members' => [ 'NestedParam1' => [ 'type' => 'string', ], 'NestedParam2' => [ 'type' => 'long', ] ] ], 'ListParam' => [ 'type' => 'list', 'member' => [ 'type' => 'structure', 'members' => [ 'NestedParam1' => [ 'type' => 'integer' ], 'NestedParam2' => [ 'type' => 'string' ] ] ], ] ] ] ], ] ], function () { return []; } ); } }