diff options
Diffstat (limited to 'php/tests/well_known_test.php')
-rw-r--r-- | php/tests/well_known_test.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/php/tests/well_known_test.php b/php/tests/well_known_test.php index 1e8c4f42..9f2661fa 100644 --- a/php/tests/well_known_test.php +++ b/php/tests/well_known_test.php @@ -312,11 +312,12 @@ class WellKnownTest extends TestBase { $from = new DateTime('2011-01-01T15:03:01.012345UTC'); $timestamp->fromDateTime($from); $this->assertEquals($from->format('U'), $timestamp->getSeconds()); - $this->assertSame(0, $timestamp->getNanos()); + $this->assertEquals(1000 * $from->format('u'), $timestamp->getNanos()); $to = $timestamp->toDateTime(); $this->assertSame(\DateTime::class, get_class($to)); $this->assertSame($from->format('U'), $to->format('U')); + $this->assertSame($from->format('u'), $to->format('u')); } public function testType() |