From a6e2fa228928a6aeb5adb37d13064aeadea4663a Mon Sep 17 00:00:00 2001 From: Florent Destremau Date: Tue, 5 Mar 2024 10:43:11 +0100 Subject: [PATCH] Fixed codestyle --- tests/Query/Postgresql/DateTruncTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Query/Postgresql/DateTruncTest.php b/tests/Query/Postgresql/DateTruncTest.php index 07fbd8c4..92d2bad2 100644 --- a/tests/Query/Postgresql/DateTruncTest.php +++ b/tests/Query/Postgresql/DateTruncTest.php @@ -2,6 +2,7 @@ namespace DoctrineExtensions\Tests\Query\Postgresql; +use DateTime; use Doctrine\ORM\QueryBuilder; use DoctrineExtensions\Tests\Entities\Date; use DoctrineExtensions\Tests\Query\PostgresqlTestCase; @@ -20,16 +21,15 @@ public function testDateTrunc(): void $this->assertEquals($expected, $queryBuilder->getQuery()->getSQL()); } - public function testDateTruncCondition() + public function testDateTruncCondition(): void { $queryBuilder = $this->entityManager->getRepository(Date::class) ->createQueryBuilder('dt') ->where("date_trunc('YEAR', dt.created) = date_trunc('YEAR', :date)") - ->setParameter('date', new \DateTime('2010-01-01')); + ->setParameter('date', new DateTime('2010-01-01')); $expected = "SELECT d0_.id AS id_0, d0_.created AS created_1 FROM Date d0_ WHERE DATE_TRUNC('YEAR'::text, d0_.created::timestamp) = DATE_TRUNC('YEAR'::text, ?::timestamp)"; $this->assertEquals($expected, $queryBuilder->getQuery()->getSQL()); - } }