OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
zzaws-ses
/
vendor
/
aws
/
aws-sdk-php
/
tests
/
S3
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/14/2024 08:01:07 AM
rwxr-xr-x
📄
AmbiguousSuccessParserTest.php
3.68 KB
08/14/2024 07:59:11 AM
rw-r--r--
📄
ApplyChecksumMiddlewareTest.php
7.42 KB
08/14/2024 07:59:11 AM
rw-r--r--
📄
BatchDeleteTest.php
6.73 KB
08/14/2024 07:59:11 AM
rw-r--r--
📄
BucketEndpointArnMiddlewareTest.php
21.78 KB
08/14/2024 07:59:11 AM
rw-r--r--
📄
BucketEndpointMiddlewareTest.php
6.02 KB
08/14/2024 07:59:11 AM
rw-r--r--
📁
Crypto
-
08/14/2024 08:01:07 AM
rwxr-xr-x
📁
Exception
-
08/14/2024 08:01:07 AM
rwxr-xr-x
📄
GetBucketLocationParserTest.php
1.34 KB
08/14/2024 07:59:11 AM
rw-r--r--
📄
MultipartCopyTest.php
4.94 KB
08/14/2024 07:59:11 AM
rw-r--r--
📄
MultipartUploaderTest.php
12.52 KB
08/14/2024 07:59:11 AM
rw-r--r--
📄
ObjectCopierTest.php
15.15 KB
08/14/2024 07:59:11 AM
rw-r--r--
📄
ObjectUploaderTest.php
11.32 KB
08/14/2024 07:59:11 AM
rw-r--r--
📄
PermanentRedirectMiddlewareTest.php
982 bytes
08/14/2024 07:59:11 AM
rw-r--r--
📄
PostObjectTest.php
3.52 KB
08/14/2024 07:59:11 AM
rw-r--r--
📄
PostObjectV4Test.php
11.12 KB
08/14/2024 07:59:11 AM
rw-r--r--
📄
PutObjectUrlMiddlewareTest.php
2 KB
08/14/2024 07:59:11 AM
rw-r--r--
📁
RegionalEndpoint
-
08/14/2024 08:01:08 AM
rwxr-xr-x
📄
RetryableMalformedResponseParserTest.php
934 bytes
08/14/2024 07:59:11 AM
rw-r--r--
📄
S3ClientTest.php
92.05 KB
08/14/2024 07:59:12 AM
rw-r--r--
📄
S3EndpointMiddlewareTest.php
30.05 KB
08/14/2024 07:59:11 AM
rw-r--r--
📄
S3MultiRegionClientTest.php
24.99 KB
08/14/2024 07:59:12 AM
rw-r--r--
📄
S3UriParserTest.php
7.45 KB
08/14/2024 07:59:12 AM
rw-r--r--
📄
SSECMiddlewareTest.php
2.91 KB
08/14/2024 07:59:12 AM
rw-r--r--
📄
StreamWrapperPathStyleTest.php
30.16 KB
08/14/2024 07:59:12 AM
rw-r--r--
📄
StreamWrapperTest.php
36.33 KB
08/14/2024 07:59:12 AM
rw-r--r--
📄
StreamWrapperV2ExistenceTest.php
32.63 KB
08/14/2024 07:59:12 AM
rw-r--r--
📄
TransferTest.php
14.24 KB
08/14/2024 07:59:12 AM
rw-r--r--
📁
UseArnRegion
-
08/14/2024 08:01:08 AM
rwxr-xr-x
📄
ValidateResponseChecksumParserTest.php
5.45 KB
08/14/2024 07:59:12 AM
rw-r--r--
📁
fixtures
-
08/14/2024 08:08:07 AM
rwxr-xr-x
📄
sig_hack.php
226 bytes
08/14/2024 07:59:12 AM
rw-r--r--
📁
test_cases
-
08/14/2024 08:01:08 AM
rwxr-xr-x
Editing: S3UriParserTest.php
Close
<?php namespace Aws\Test\S3; use Aws\Arn\Exception\InvalidArnException; use Aws\S3\S3UriParser; use Yoast\PHPUnitPolyfills\TestCases\TestCase; /** * @covers Aws\S3\S3UriParser */ class S3UriParserTest extends TestCase { public function uriProvider() { return [ ['http://s3.amazonaws.com', ['region' => null, 'bucket' => null, 'key' => null, 'path_style' => true]], ['http://s3.amazonaws.com/bar', ['region' => null, 'bucket' => 'bar', 'key' => null, 'path_style' => true]], ['http://s3.amazonaws.com/bar/', ['region' => null, 'bucket' => 'bar', 'key' => null, 'path_style' => true]], ['http://s3.amazonaws.com/bar/baz', ['region' => null, 'bucket' => 'bar', 'key' => 'baz', 'path_style' => true]], ['http://s3.amazonaws.com/bar/baz/', ['region' => null, 'bucket' => 'bar', 'key' => 'baz/', 'path_style' => true]], ['http://foo.s3.amazonaws.com', ['region' => null, 'bucket' => 'foo', 'key' => null, 'path_style' => false]], ['http://foo.s3.amazonaws.com/', ['region' => null, 'bucket' => 'foo', 'key' => null, 'path_style' => false]], ['http://foo.s3.amazonaws.com/bar', ['region' => null, 'bucket' => 'foo', 'key' => 'bar', 'path_style' => false]], ['http://foo.s3.amazonaws.com/bar/baz', ['region' => null, 'bucket' => 'foo', 'key' => 'bar/baz', 'path_style' => false]], ['http://foo.s3.amazonaws.com/bar/baz/', ['region' => null, 'bucket' => 'foo', 'key' => 'bar/baz/', 'path_style' => false]], ['http://foo.baz.s3.amazonaws.com', ['region' => null, 'bucket' => 'foo.baz', 'key' => null, 'path_style' => false]], ['http://foo.baz.s3.amazonaws.com/', ['region' => null, 'bucket' => 'foo.baz', 'key' => null, 'path_style' => false]], ['http://foo.baz.s3.amazonaws.com/bar', ['region' => null, 'bucket' => 'foo.baz', 'key' => 'bar', 'path_style' => false]], ['http://foo.baz.s3.amazonaws.com/bar/baz', ['region' => null, 'bucket' => 'foo.baz', 'key' => 'bar/baz', 'path_style' => false]], ['http://foo.baz.s3.amazonaws.com/bar/baz/', ['region' => null, 'bucket' => 'foo.baz', 'key' => 'bar/baz/', 'path_style' => false]], ['http://s3-us-west-2.amazonaws.com', ['region' => 'us-west-2', 'bucket' => null, 'key' => null, 'path_style' => true]], ['http://s3-us-west-2.amazonaws.com/', ['region' => 'us-west-2', 'bucket' => null, 'key' => null, 'path_style' => true]], ['http://s3-us-west-2.amazonaws.com/bar', ['region' => 'us-west-2', 'bucket' => 'bar', 'key' => null, 'path_style' => true]], ['http://s3-us-west-2.amazonaws.com/bar/', ['region' => 'us-west-2', 'bucket' => 'bar', 'key' => null, 'path_style' => true]], ['http://s3-us-west-2.amazonaws.com/bar/baz', ['region' => 'us-west-2', 'bucket' => 'bar', 'key' => 'baz', 'path_style' => true]], ['http://s3-us-west-2.amazonaws.com/bar/baz/', ['region' => 'us-west-2', 'bucket' => 'bar', 'key' => 'baz/', 'path_style' => true]], ['http://foo.s3-us-west-2.amazonaws.com', ['region' => 'us-west-2', 'bucket' => 'foo', 'key' => null, 'path_style' => false]], ['http://foo.s3-us-west-2.amazonaws.com/', ['region' => 'us-west-2', 'bucket' => 'foo', 'key' => null, 'path_style' => false]], ['http://foo.s3-us-west-2.amazonaws.com/bar', ['region' => 'us-west-2', 'bucket' => 'foo', 'key' => 'bar', 'path_style' => false]], ['http://foo.s3-us-west-2.amazonaws.com/bar/baz', ['region' => 'us-west-2', 'bucket' => 'foo', 'key' => 'bar/baz', 'path_style' => false]], ['http://foo.s3-us-west-2.amazonaws.com/bar/baz/', ['region' => 'us-west-2', 'bucket' => 'foo', 'key' => 'bar/baz/', 'path_style' => false]], ['http://foo.baz.s3-us-west-2.amazonaws.com', ['region' => 'us-west-2', 'bucket' => 'foo.baz', 'key' => null, 'path_style' => false]], ['http://foo.baz.s3-us-west-2.amazonaws.com/', ['region' => 'us-west-2', 'bucket' => 'foo.baz', 'key' => null, 'path_style' => false]], ['http://foo.baz.s3-us-west-2.amazonaws.com/bar', ['region' => 'us-west-2', 'bucket' => 'foo.baz', 'key' => 'bar', 'path_style' => false]], ['http://foo.baz.s3-us-west-2.amazonaws.com/bar/baz', ['region' => 'us-west-2', 'bucket' => 'foo.baz', 'key' => 'bar/baz', 'path_style' => false]], ['http://foo.baz.s3-us-west-2.amazonaws.com/bar/baz/', ['region' => 'us-west-2', 'bucket' => 'foo.baz', 'key' => 'bar/baz/', 'path_style' => false]], ['http://jarjar.binks.com/foo/bar', ['bucket' => 'foo', 'key' => 'bar', 'path_style' => true, 'region' => null]], ['http://jarjar.binks.com/foo/bar/baz', ['bucket' => 'foo', 'key' => 'bar/baz', 'path_style' => true, 'region' => null]], ['http://amazonaws.com/foo', ['bucket' => 'foo', 'key' => null, 'path_style' => true, 'region' => null]], ['s3://bar/baz/foo/', ['region' => null, 'bucket' => 'bar', 'key' => 'baz/foo/', 'path_style' => false]], ['s3://bar/baz/foo', ['region' => null, 'bucket' => 'bar', 'key' => 'baz/foo', 'path_style' => false]], ['s3://bar/baz/', ['region' => null, 'bucket' => 'bar', 'key' => 'baz/', 'path_style' => false]], ['s3://bar/baz', ['region' => null, 'bucket' => 'bar', 'key' => 'baz', 'path_style' => false]], ['s3://bar/', ['region' => null, 'bucket' => 'bar', 'key' => null, 'path_style' => false]], ['s3://bar', ['region' => null, 'bucket' => 'bar', 'key' => null, 'path_style' => false]], ['s3://', [], true], [ 's3://arn:aws:s3:us-east-1:123456789012:accesspoint:myaccess/test_key', [ 'region' => 'us-east-1', 'bucket' => 'arn:aws:s3:us-east-1:123456789012:accesspoint:myaccess', 'key' => 'test_key', 'path_style' => false ] ], [ 's3://arn:aws:s3:us-east-1:123456789012:accesspoint:myaccess/test/key/with/other/components', [ 'region' => 'us-east-1', 'bucket' => 'arn:aws:s3:us-east-1:123456789012:accesspoint:myaccess', 'key' => 'test/key/with/other/components', 'path_style' => false ] ], ['s-3://arn:aws:s3:us-east-1:123456789012:accesspoint:myaccess/test_key', [], true], ['s3://arn:aws:s3:us-east-1:123456789012:some_resource:myaccess/test_key', [], true], ['s3://arn:aws:ec2:us-east-1:123456789012:accesspoint:myaccess/test_key', [], true], ['/foo/bar', [], true], ]; } /** * @dataProvider uriProvider */ public function testParsesUrls($uri, $result, $isError = false) { ksort($result); try { $actual = (new S3UriParser())->parse($uri); ksort($actual); $this->assertSame($result, $actual); } catch (\InvalidArgumentException $e) { $this->addToAssertionCount(1); // To be replaced with $this->expectNotToPerformAssertions(); if (!$isError) { throw $e; } } catch (InvalidArnException $e) { $this->addToAssertionCount(1); // To be replaced with $this->expectNotToPerformAssertions(); if (!$isError) { throw $e; } } } }