OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
znew1aws-ses
/
vendor
/
aws
/
aws-sdk-php
/
tests
/
Integ
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/16/2024 08:32:34 AM
rwxr-xr-x
📄
BatchingContext.php
6.76 KB
08/16/2024 08:30:05 AM
rw-r--r--
📄
BlockingContext.php
4.77 KB
08/16/2024 08:30:05 AM
rw-r--r--
📄
ConcurrencyContext.php
4.73 KB
08/16/2024 08:30:05 AM
rw-r--r--
📄
CredentialsContext.php
4.07 KB
08/16/2024 08:30:05 AM
rw-r--r--
📄
CrtContext.php
8.28 KB
08/16/2024 08:30:05 AM
rw-r--r--
📄
GuzzleV5HandlerTest.php
2.62 KB
08/16/2024 08:30:05 AM
rw-r--r--
📄
GuzzleV6StreamHandlerTest.php
2.44 KB
08/16/2024 08:30:06 AM
rw-r--r--
📄
IntegUtils.php
1.53 KB
08/16/2024 08:30:06 AM
rw-r--r--
📄
MultipartContext.php
7.36 KB
08/16/2024 08:30:06 AM
rw-r--r--
📄
NativeStreamContext.php
4.65 KB
08/16/2024 08:30:06 AM
rw-r--r--
📄
S3Context.php
11.13 KB
08/16/2024 08:30:06 AM
rw-r--r--
📄
S3EncryptionContext.php
7.44 KB
08/16/2024 08:30:06 AM
rw-r--r--
📄
S3EncryptionContextV2.php
7.79 KB
08/16/2024 08:30:06 AM
rw-r--r--
📄
SmokeContext.php
12.25 KB
08/16/2024 08:30:06 AM
rw-r--r--
Editing: GuzzleV6StreamHandlerTest.php
Close
<?php namespace Aws\Test\Integ; use GuzzleHttp\Handler\StreamHandler; use Yoast\PHPUnitPolyfills\TestCases\TestCase; class GuzzleV6StreamHandlerTest extends TestCase { use IntegUtils; public function set_up() { if (!class_exists('GuzzleHttp\Handler\StreamHandler')) { $this->markTestSkipped(); } } public function testCanUseStreamForBasicRequests() { $handler = new StreamHandler(); $s3 = $this->getSdk()->createS3([ 'http_handler' => $handler, 'use_path_style_endpoint' => true ]); $result = $s3->listBuckets(); $this->assertNotEmpty($result->search('Owner.ID')); $ddb = $this->getSdk()->createDynamoDb(['http_handler' => $handler]); $result = $ddb->listTables(); $this->assertArrayHasKey('TableNames', $result); } public function testCanUseStreamForComplexWorkflow() { $handler = new StreamHandler(); $bucket = 'aws-sdk-php-test-stream-handler'; $s3 = $this->getSdk()->createS3(['http_handler' => $handler]); self::log("Creating bucket {$bucket}."); $promise = $s3 ->createBucketAsync(['Bucket' => $bucket]) ->then(function () use ($s3, $bucket) { self::log("Waiting for bucket {$bucket}."); return $s3->getWaiter('BucketExists', ['Bucket' => $bucket])->promise(); }) ->then(function () use ($s3, $bucket) { self::log("Uploading object to bucket {$bucket}."); return $s3->putObjectAsync([ 'Bucket' => $bucket, 'Key' => 'foo', 'Body' => 'bar' ]); }) ->then(function () use ($s3, $bucket) { self::log("Deleting object from bucket {$bucket}."); return $s3->deleteObjectAsync([ 'Bucket' => $bucket, 'Key' => 'foo', ]); }) ->then(function () use ($s3, $bucket) { self::log("Deleting bucket {$bucket}."); return $s3->deleteBucketAsync([ 'Bucket' => $bucket, ]); }); /** @var \Aws\Result $result */ $result = $promise->wait(); $this->assertSame(204, $result['@metadata']['statusCode']); } }