OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
aws-ses
/
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:21 AM
rwxr-xr-x
📄
ApiProviderTest.php
4.29 KB
05/19/2025 10:07:21 AM
rw-r--r--
📄
DateTimeResultTest.php
1.58 KB
05/19/2025 10:07:21 AM
rw-r--r--
📁
ErrorParser
-
05/19/2025 10:07:21 AM
rwxr-xr-x
📄
ListShapeTest.php
786 bytes
05/19/2025 10:07:21 AM
rw-r--r--
📄
MapShapeTest.php
1.15 KB
05/19/2025 10:07:21 AM
rw-r--r--
📄
OperationTest.php
3.93 KB
05/19/2025 10:07:21 AM
rw-r--r--
📁
Parser
-
05/19/2025 10:07:21 AM
rwxr-xr-x
📁
Serializer
-
05/19/2025 10:07:21 AM
rwxr-xr-x
📄
ServiceTest.php
9.2 KB
05/19/2025 10:07:21 AM
rw-r--r--
📄
ShapeMapTest.php
949 bytes
05/19/2025 10:07:21 AM
rw-r--r--
📄
ShapeTest.php
2.97 KB
05/19/2025 10:07:21 AM
rw-r--r--
📄
Stringable.php
137 bytes
05/19/2025 10:07:21 AM
rw-r--r--
📄
StructureShapeTest.php
1.62 KB
05/19/2025 10:07:21 AM
rw-r--r--
📄
TimestampShapeTest.php
1.89 KB
05/19/2025 10:07:21 AM
rw-r--r--
📄
ValidatorTest.php
24.8 KB
05/19/2025 10:07:21 AM
rw-r--r--
📁
api_provider_fixtures
-
01/07/2025 12:10:31 PM
rwxr-xr-x
📁
eventstream_fixtures
-
01/07/2025 12:10:31 PM
rwxr-xr-x
📁
test_cases
-
01/07/2025 12:10:31 PM
rwxr-xr-x
Editing: TimestampShapeTest.php
Close
<?php namespace Aws\Test\Api; use Aws\Api\TimestampShape; use Aws\Api\ShapeMap; use Yoast\PHPUnitPolyfills\TestCases\TestCase; /** * @covers \Aws\Api\TimestampShape */ class TimestampShapeTest extends TestCase { public function formatProvider() { $t = strtotime('january 5, 1999'); return [ ['january 5, 1999', 'iso8601', '1999-01-05T00:00:00Z'], ['january 5, 1999', 'rfc822', 'Tue, 05 Jan 1999 00:00:00 GMT'], ['january 5, 1999', 'unixTimestamp', '915494400'], [$t, 'iso8601', '1999-01-05T00:00:00Z'], [$t, 'rfc822', 'Tue, 05 Jan 1999 00:00:00 GMT'], [new \DateTime('january 5, 1999'), 'unixTimestamp', '915494400'], [new \DateTime('january 5, 1999'), 'iso8601', '1999-01-05T00:00:00Z'], [new \DateTime('january 5, 1999'), 'rfc822', 'Tue, 05 Jan 1999 00:00:00 GMT'], [new \DateTimeImmutable('january 5, 1999'), 'unixTimestamp', '915494400'], [new \DateTimeImmutable('january 5, 1999'), 'iso8601', '1999-01-05T00:00:00Z'], [new \DateTimeImmutable('january 5, 1999'), 'rfc822', 'Tue, 05 Jan 1999 00:00:00 GMT'] ]; } /** * @dataProvider formatProvider */ public function testFormatsData($value, $format, $result) { $s = new TimestampShape([], new ShapeMap([])); $this->assertEquals($result, $s->format($value, $format)); } public function testValidatesTimestampFormat() { $this->expectException(\UnexpectedValueException::class); $s = new TimestampShape([], new ShapeMap([])); $s->format('now', 'foo'); } public function testValidatesTimestampValue() { $this->expectException(\InvalidArgumentException::class); $s = new TimestampShape([], new ShapeMap([])); $s->format(true, 'iso8601'); } }