OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
Xpress_backup
/
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:19 AM
rwxr-xr-x
📄
ApiProviderTest.php
4.29 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
DateTimeResultTest.php
1.58 KB
05/19/2025 10:07:19 AM
rw-r--r--
📁
ErrorParser
-
05/19/2025 10:07:19 AM
rwxr-xr-x
📄
ListShapeTest.php
786 bytes
05/19/2025 10:07:19 AM
rw-r--r--
📄
MapShapeTest.php
1.15 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
OperationTest.php
3.93 KB
05/19/2025 10:07:19 AM
rw-r--r--
📁
Parser
-
05/19/2025 10:07:19 AM
rwxr-xr-x
📁
Serializer
-
05/19/2025 10:07:19 AM
rwxr-xr-x
📄
ServiceTest.php
9.2 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
ShapeMapTest.php
949 bytes
05/19/2025 10:07:19 AM
rw-r--r--
📄
ShapeTest.php
2.97 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
Stringable.php
137 bytes
05/19/2025 10:07:19 AM
rw-r--r--
📄
StructureShapeTest.php
1.62 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
TimestampShapeTest.php
1.89 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
ValidatorTest.php
24.8 KB
05/19/2025 10:07:19 AM
rw-r--r--
📁
api_provider_fixtures
-
01/06/2025 09:14:23 AM
rwxr-xr-x
📁
eventstream_fixtures
-
01/06/2025 09:13:17 AM
rwxr-xr-x
📁
test_cases
-
01/06/2025 09:14:58 AM
rwxr-xr-x
Editing: DateTimeResultTest.php
Close
<?php namespace Aws\Test\Api; use Aws\Api\DateTimeResult; use PHPUnit\Framework\TestCase; /** * @covers \Aws\Api\DateTimeResult */ class DateTimeResultTest extends TestCase { public function testCreatesFromEpoch() { $t = time(); $d = DateTimeResult::fromEpoch($t); $this->assertSame((string) $t, $d->format('U')); } public function testCreatesFromEpochFloat() { $t = 16344171.123432; $d = DateTimeResult::fromEpoch($t); $this->assertSame('16344171', $d->format('U')); $this->assertSame(\PHP_VERSION_ID < 56000 ? '16344171.000000' : '16344171.123432', $d->format('U.u')); } public function testCreatesFromEpochFloatInForeignDecimalSeparatorFormat() { $oldLocale = setlocale(LC_ALL, 0); setlocale(LC_ALL, 'es_ES.UTF-8'); $t = 16344171.123432; $d = DateTimeResult::fromEpoch($t); $this->assertSame('16344171', $d->format('U')); $this->assertSame('1970-07-09T04:02:51+00:00', (string)$d); $this->assertSame(\PHP_VERSION_ID < 56000 ? '16344171.000000' : '16344171.123432', $d->format('U.u')); setlocale(LC_ALL, $oldLocale); } public function testCastToIso8601String() { $t = time(); $d = DateTimeResult::fromEpoch($t); $this->assertSame(gmdate('c', $t), (string) $d); } public function testJsonSerialzesAsIso8601() { $t = time(); $d = DateTimeResult::fromEpoch($t); $this->assertSame('"' . gmdate('c', $t). '"', json_encode($d)); } }