OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
zzXpress
/
vendor
/
aws
/
aws-sdk-php
/
tests
/
Api
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/19/2025 10:07:24 AM
rwxr-xr-x
📄
ApiProviderTest.php
4.29 KB
05/19/2025 10:07:24 AM
rw-r--r--
📄
DateTimeResultTest.php
1.58 KB
05/19/2025 10:07:24 AM
rw-r--r--
📁
ErrorParser
-
05/19/2025 10:07:24 AM
rwxr-xr-x
📄
ListShapeTest.php
786 bytes
05/19/2025 10:07:24 AM
rw-r--r--
📄
MapShapeTest.php
1.15 KB
05/19/2025 10:07:24 AM
rw-r--r--
📄
OperationTest.php
3.93 KB
05/19/2025 10:07:24 AM
rw-r--r--
📁
Parser
-
05/19/2025 10:07:24 AM
rwxr-xr-x
📁
Serializer
-
05/19/2025 10:07:24 AM
rwxr-xr-x
📄
ServiceTest.php
9.2 KB
05/19/2025 10:07:24 AM
rw-r--r--
📄
ShapeMapTest.php
949 bytes
05/19/2025 10:07:24 AM
rw-r--r--
📄
ShapeTest.php
2.97 KB
05/19/2025 10:07:24 AM
rw-r--r--
📄
Stringable.php
137 bytes
05/19/2025 10:07:24 AM
rw-r--r--
📄
StructureShapeTest.php
1.62 KB
05/19/2025 10:07:24 AM
rw-r--r--
📄
TimestampShapeTest.php
1.89 KB
05/19/2025 10:07:24 AM
rw-r--r--
📄
ValidatorTest.php
24.8 KB
05/19/2025 10:07:24 AM
rw-r--r--
📁
api_provider_fixtures
-
11/13/2024 03:03:34 PM
rwxr-xr-x
📁
eventstream_fixtures
-
11/13/2024 03:02:20 PM
rwxr-xr-x
📁
test_cases
-
11/13/2024 03:04:14 PM
rwxr-xr-x
Editing: OperationTest.php
Close
<?php namespace Aws\Test\Api; use Aws\Api\Shape; use Aws\Api\ShapeMap; use Aws\Api\Operation; use Yoast\PHPUnitPolyfills\TestCases\TestCase; /** * @covers \Aws\Api\Operation */ class OperationTest extends TestCase { public function testCreatesDefaultMethodAndUri() { $o = new Operation([], new ShapeMap([])); $this->assertSame('POST', $o->getHttp()['method']); $this->assertSame('/', $o->getHttp()['requestUri']); } public function testReturnsEmptyShapes() { $o = new Operation([], new ShapeMap([])); $this->assertInstanceOf(Shape::class, $o->getInput()); $this->assertInstanceOf(Shape::class, $o->getOutput()); $this->assertIsArray($o->getErrors()); } public function testReturnsInputShape() { $o = new Operation([ 'input' => ['shape' => 'i'] ], new ShapeMap([ 'i' => ['type' => 'structure'] ])); $i = $o->getInput(); $this->assertInstanceOf(Shape::class, $i); $this->assertSame('structure', $i->getType()); $this->assertSame($i, $o->getInput()); } public function testReturnsOutputShape() { $o = new Operation([ 'output' => ['shape' => 'os'] ], new ShapeMap([ 'os' => ['type' => 'structure'] ])); $os = $o->getOutput(); $this->assertInstanceOf(Shape::class, $os); $this->assertSame('structure', $os->getType()); $this->assertSame($os, $o->getOutput()); } public function testReturnsErrorsShapeArray() { $o = new Operation([ 'errors' =>[['shape' => 'a'], ['shape' => 'b']] ], new ShapeMap([ 'a' => ['type' => 'structure'], 'b' => ['type' => 'list'], ])); $e = $o->getErrors(); $this->assertIsArray($e); $this->assertInstanceOf(Shape::class , $e[0]); $this->assertInstanceOf(Shape::class, $e[1]); $this->assertSame('structure', $e[0]->getType()); $this->assertSame('list', $e[1]->getType()); } public function testErrorsDoesNotCreateReferences() { $o = new Operation([ 'errors' =>[['shape' => 'a'], ['shape' => 'b']] ], new ShapeMap([ 'a' => ['type' => 'structure'], 'b' => ['type' => 'list'], ])); $errors = $o->getErrors(); $errorsCopy = $errors; $errorsCopy[0]['a_copy'] = $errorsCopy[0]['a']; $errorsCopy[0]['a'] = 'test'; $this->assertSame('structure', $errors[0]->getType()); } public function testGetStaticContextParams() { $params = ['Foo' => ['value' => 'bar']]; $o = new Operation([ 'staticContextParams' => $params ], new ShapeMap([ 'i' => ['type' => 'structure'] ])); $staticContextParams = $o->getStaticContextParams(); $this->assertEquals( $params, $staticContextParams ); } public function testGetContextParams() { $expected = [ 'Foo' => [ 'shape' => 'Foo', 'type' => 'string' ] ]; $o = new Operation([ 'input' => ['shape' => 'FooOperationRequest'] ], new ShapeMap([ 'FooOperationRequest' => [ 'type' => 'structure', 'members' => [ 'Foo' => [ 'shape' => 'Foo', 'contextParam' => [ 'name' => 'Foo' ] ] ] ], 'Foo' => [ 'type' => 'string' ] ])); $contextParams = $o->getContextParams(); $this->assertEquals( $expected, $contextParams ); } }