OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
zzaws-ses
/
vendor
/
aws
/
aws-sdk-php
/
tests
/
EndpointV2
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/14/2024 08:01:07 AM
rwxr-xr-x
📄
EndpointDefinitionProviderTest.php
2.54 KB
08/14/2024 07:59:08 AM
rw-r--r--
📄
EndpointProviderV2Test.php
14.93 KB
08/14/2024 07:59:08 AM
rw-r--r--
📄
EndpointV2MiddlewareTest.php
8.94 KB
08/14/2024 07:59:08 AM
rw-r--r--
📄
EndpointV2SerializerTraitTest.php
2.74 KB
08/14/2024 07:59:08 AM
rw-r--r--
📄
RuleCreatorTest.php
2.02 KB
08/14/2024 07:59:08 AM
rw-r--r--
📄
RulesetEndpointTest.php
1.44 KB
08/14/2024 07:59:08 AM
rw-r--r--
📄
RulesetParameterTest.php
2.04 KB
08/14/2024 07:59:08 AM
rw-r--r--
📄
RulesetStandardLibraryTest.php
9.79 KB
08/14/2024 07:59:08 AM
rw-r--r--
📁
invalid-rules
-
08/14/2024 08:01:05 AM
rwxr-xr-x
📁
test-cases
-
08/14/2024 08:01:06 AM
rwxr-xr-x
📁
valid-rules
-
08/14/2024 08:01:06 AM
rwxr-xr-x
Editing: RuleCreatorTest.php
Close
<?php namespace Aws\Test\EndpointV2; use Aws\EndpointV2\Rule; use Aws\Exception\UnresolvedEndpointException; use Yoast\PHPUnitPolyfills\TestCases\TestCase; /** * @covers \Aws\EndpointV2\Rule\RuleCreator */ class RuleCreatorTest extends TestCase { public function ruleCreationProvider() { return [ [ [ 'type' => "endpoint", 'conditions' => [], 'endpoint' => [ 'url' => 'https://{Region}.someService.{PartitionResult#dnsSuffix}' ], 'properties' => [], 'headers' => [] ], Rule\EndpointRule::class ], [ [ 'type' => "error", 'conditions' => [], 'error' => 'This is an error' ], Rule\ErrorRule::class ], [ [ 'type' => "tree", 'conditions' => [], 'rules' => [] ], Rule\TreeRule::class ] ]; } /** * @dataProvider RuleCreationProvider */ public function testRuleCreation($spec, $expected) { $result = Rule\RuleCreator::create($spec['type'], $spec); $this->assertInstanceOf($expected, $result); } public function invalidRuleTypeProvider() { return [ ['foo'], [1], [null], ]; } /** * @dataProvider invalidRuleTypeProvider */ public function testThrowsExceptionForInvalidRuleType($input) { $this->expectException(UnresolvedEndpointException::class); $this->expectExceptionMessage( 'Unknown rule type ' . $input . ' must be of type `endpoint`, `tree` or `error`' ); Rule\RuleCreator::create($input, null); } }