8000 add test for DatePointType converting database string to PHP value · symfony/symfony@85ef2a3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 85ef2a3

Browse files
committed
add test for DatePointType converting database string to PHP value
1 parent d78481c commit 85ef2a3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Symfony/Bridge/Doctrine/Tests/Types/DatePointTypeTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,14 @@ public function testDateTimeImmutableConvertsToPHPValue()
7676
$this->assertSame($expected->format($format), $actual->format($format));
7777
}
7878

79+
public function testDatabaseValueConvertsToPHPValue()
80+
{
81+
$actual = $this->type->convertToPHPValue('2025-03-03 12:13:14', new PostgreSQLPlatform());
82+
83+
$this->assertInstanceOf(DatePoint::class, $actual);
84+
$this->assertSame('2025-03-03 12:13:14', $actual->format('Y-m-d H:i:s'));
85+
}
86+
7987
public function testGetName()
8088
{
8189
$this->assertSame('date_point', $this->type->getName());

0 commit comments

Comments
 (0)
0