OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
Xpress
/
vendor
/
aws
/
aws-sdk-php
/
tests
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📄
AbstractConfigurationProviderTest.php
3.42 KB
05/19/2025 10:07:17 AM
rw-r--r--
📁
Api
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📁
Arn
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📁
Auth
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📄
AwsClientTest.php
29.67 KB
05/19/2025 10:07:17 AM
rw-r--r--
📁
Build
-
03/05/2025 10:56:41 AM
rwxr-xr-x
📄
ClientResolverTest.php
55.74 KB
05/19/2025 10:07:17 AM
rw-r--r--
📁
ClientSideMonitoring
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📁
CloudFront
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📁
CloudSearchDomain
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📁
CloudTrail
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📁
CloudWatchLogs
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📁
CognitoIdentity
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📁
CognitoSync
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📄
CommandPoolTest.php
5.8 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
CommandTest.php
3.28 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
ConfigurationResolverTest.php
12.35 KB
05/19/2025 10:07:17 AM
rw-r--r--
📁
Credentials
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📁
Crypto
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📁
DefaultsMode
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📁
DocDb
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📄
DoctrineCacheAdapterTest.php
1.23 KB
05/19/2025 10:07:17 AM
rw-r--r--
📁
DynamoDb
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📁
Ec2
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📁
ElasticLoadBalancingV2
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📁
Endpoint
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📁
EndpointDiscovery
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📄
EndpointParameterMiddlewareTest.php
9.21 KB
05/19/2025 10:07:17 AM
rw-r--r--
📁
EndpointV2
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📁
EventBridge
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📁
Exception
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📄
FunctionsTest.php
14.33 KB
05/19/2025 10:07:17 AM
rw-r--r--
📁
Glacier
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📁
Handler
-
03/05/2025 10:56:43 AM
rwxr-xr-x
📄
HandlerListTest.php
7.16 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
HasMonitoringEventsTraitTest.php
895 bytes
05/19/2025 10:07:17 AM
rw-r--r--
📄
HashingStreamTest.php
1.41 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
HistoryTest.php
4.2 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
IdempotencyTokenMiddlewareTest.php
2.76 KB
05/19/2025 10:07:17 AM
rw-r--r--
📁
Identity
-
03/05/2025 10:56:43 AM
rwxr-xr-x
📄
InputValidationMiddlewareTest.php
5.62 KB
05/19/2025 10:07:17 AM
rw-r--r--
📁
Integ
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📄
JsonCompilerTest.php
730 bytes
05/19/2025 10:07:17 AM
rw-r--r--
📁
Lambda
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📁
LexModelsV2
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📄
LruArrayCacheTest.php
1.59 KB
05/19/2025 10:07:17 AM
rw-r--r--
📁
MachineLearning
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📄
MiddlewareTest.php
16.08 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
MockHandlerTest.php
3.79 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
MultiRegionClientTest.php
5.41 KB
05/19/2025 10:07:17 AM
rw-r--r--
📁
Multipart
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📁
Neptune
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📄
PerformanceContext.php
8.2 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
PhpHashTest.php
1.33 KB
05/19/2025 10:07:17 AM
rw-r--r--
📁
Polly
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📄
PresignUrlMiddlewareTest.php
3.95 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
Psr16CacheAdapterTest.php
1.84 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
PsrCacheAdapterTest.php
2.64 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
QueryCompatibleInputMiddlewareTest.php
9.1 KB
05/19/2025 10:07:17 AM
rw-r--r--
📁
Rds
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📁
RequestCompression
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📄
ResultPaginatorTest.php
16.21 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
ResultTest.php
1.38 KB
05/19/2025 10:07:17 AM
rw-r--r--
📁
Retry
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📄
RetryMiddlewareTest.php
24.57 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
RetryMiddlewareV2Test.php
40.33 KB
05/19/2025 10:07:17 AM
rw-r--r--
📁
Route53
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📁
S3
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📁
S3Control
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📁
Script
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📄
SdkTest.php
2.37 KB
05/19/2025 10:07:17 AM
rw-r--r--
📁
Ses
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📁
Signature
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📁
Sqs
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📁
Ssm
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📄
StreamRequestPayloadMiddlewareTest.php
10.1 KB
05/19/2025 10:07:17 AM
rw-r--r--
📁
Sts
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📄
TestServiceTrait.php
3.78 KB
05/19/2025 10:07:17 AM
rw-r--r--
📁
Token
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📄
TraceMiddlewareTest.php
16.16 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
UsesServiceTrait.php
4.37 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
WaiterTest.php
12.63 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
WrappedHttpHandlerTest.php
13.8 KB
05/19/2025 10:07:17 AM
rw-r--r--
📁
bootstrap
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📄
bootstrap.php
1.53 KB
05/19/2025 10:07:17 AM
rw-r--r--
📁
fixtures
-
03/05/2025 11:00:30 AM
rwxr-xr-x
📁
static
-
03/05/2025 10:54:31 AM
rwxr-xr-x
Editing: MockHandlerTest.php
Close
<?php namespace Aws\Test; use Aws\Command; use Aws\CommandInterface; use Aws\Exception\AwsException; use Aws\MockHandler; use Aws\Result; use Psr\Http\Message\RequestInterface; use GuzzleHttp\Psr7\Request; use GuzzleHttp\Promise; use Yoast\PHPUnitPolyfills\TestCases\TestCase; /** * @covers Aws\MockHandler */ class MockHandlerTest extends TestCase { public function testValidatesEachResult() { $this->expectExceptionMessage("Expected an Aws\ResultInterface or Exception"); $this->expectException(\InvalidArgumentException::class); new MockHandler(['foo']); } public function testCanCount() { $h = new Mockhandler([new Result([]), new Result([])]); $h->append(new Result([])); $this->assertCount(3, $h); } public function testCanCountEmpty() { $h = new Mockhandler(); $this->assertCount(0, $h); } public function testReturnsMockResultsFromQueue() { $h = new MockHandler(); $r1 = new Result([]); $r2 = new Result([]); $h->append($r1, $r2); $cmd = new Command('foo'); $request = new Request('GET', 'http://www.example.com'); $this->assertSame($r1, $h($cmd, $request)->wait()); $this->assertSame($r2, $h($cmd, $request)->wait()); } public function testThrowsWhenNoResultsInQueue() { $this->expectExceptionMessage("Mock queue is empty"); $this->expectException(\RuntimeException::class); $h = new MockHandler(); $cmd = new Command('foo'); $request = new Request('GET', 'http://www.example.com'); $h($cmd, $request); } public function testThrowsExceptionsFromQueue() { $this->expectExceptionMessage("Error"); $this->expectException(\Aws\Exception\AwsException::class); $cmd = new Command('foo'); $e = new AwsException('Error', $cmd); $request = new Request('GET', 'http://www.example.com'); $h = new MockHandler(); $h->append($e); $result = $h($cmd, $request); $this->assertInstanceOf('GuzzleHttp\Promise\RejectedPromise', $result); $result->wait(); } public function testCanThenOffOfEachResult() { $thens = []; $h = new MockHandler( [], function ($value) use (&$thens) { $thens[] = $value; }, function ($reason) use (&$thens) { $thens[] = $reason; }); $r1 = new Result([]); $cmd = new Command('foo'); $request = new Request('GET', 'http://www.example.com'); $e = new AwsException('Error', $cmd); $h->append($r1, $e); $cmd = new Command('foo'); $h($cmd, $request); $h($cmd, $request); Promise\Utils::queue()->run(); $this->assertEquals([$r1, $e], $thens); } public function testCanGetLastRequestAndCommand() { $h = new MockHandler([new Result([])]); $cmd = new Command('foo'); $request = new Request('GET', 'http://www.example.com'); $h($cmd, $request); $this->assertSame($request, $h->getLastRequest()); $this->assertSame($cmd, $h->getLastCommand()); } public function testCanEnqueueCallables() { $h = new MockHandler(); $r1 = new Result([]); $cmd = new Command('foo'); $req = new Request('GET', 'http://www.example.com'); $h->append(function (CommandInterface $command, RequestInterface $request) use ($cmd, $req, $r1) { $this->assertSame($cmd, $command); $this->assertSame($req, $request); return $r1; }); $this->assertSame($r1, $h($cmd, $req)->wait()); } }