From aade8e690fe3ae8f47a1f7f5edc76cefafd6c9ad Mon Sep 17 00:00:00 2001 From: Georg Ringer Date: Wed, 1 May 2024 11:19:38 +0200 Subject: [PATCH] [TASK] Don't hardcode test times --- Tests/Functional/Repository/AddressRepositoryTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/Functional/Repository/AddressRepositoryTest.php b/Tests/Functional/Repository/AddressRepositoryTest.php index ae66546b..f34dfbb3 100644 --- a/Tests/Functional/Repository/AddressRepositoryTest.php +++ b/Tests/Functional/Repository/AddressRepositoryTest.php @@ -53,7 +53,7 @@ public function rawQueryReturnsCorrectQuery() $sql = 'SELECT `tt_address`.* FROM `tt_address` `tt_address` WHERE (((`tt_address`.`pid` IN (1, 2)) AND ( NOT((`tt_address`.`latitude` IS NULL) OR (`tt_address`.`latitude` = 0)))) AND ( NOT((`tt_address`.`longitude` IS NULL) OR (`tt_address`.`longitude` = 0)))) AND (`tt_address`.`sys_language_uid` IN (0, -1)) AND (`tt_address`.`t3ver_oid` = 0) AND ((`tt_address`.`hidden` = 0) AND (`tt_address`.`starttime` <= ' . $time . ') AND ((`tt_address`.`endtime` = 0) OR (`tt_address`.`endtime` > ' . $time . ')) AND tt_address.deleted=0)'; if ((new Typo3Version())->getMajorVersion() >= 12) { - $sql = 'SELECT `tt_address`.* FROM `tt_address` `tt_address` WHERE (((((`tt_address`.`pid` IN (1, 2)) AND ( NOT(((`tt_address`.`latitude` IS NULL) OR (`tt_address`.`latitude` = 0)))))) AND ( NOT(((`tt_address`.`longitude` IS NULL) OR (`tt_address`.`longitude` = 0)))))) AND (`tt_address`.`sys_language_uid` IN (0, -1)) AND (`tt_address`.`t3ver_oid` = 0) AND (((`tt_address`.`hidden` = 0) AND (`tt_address`.`starttime` <= 1714554720) AND (((`tt_address`.`endtime` = 0) OR (`tt_address`.`endtime` > 1714554720)))) AND tt_address.deleted=0)'; + $sql = 'SELECT `tt_address`.* FROM `tt_address` `tt_address` WHERE (((((`tt_address`.`pid` IN (1, 2)) AND ( NOT(((`tt_address`.`latitude` IS NULL) OR (`tt_address`.`latitude` = 0)))))) AND ( NOT(((`tt_address`.`longitude` IS NULL) OR (`tt_address`.`longitude` = 0)))))) AND (`tt_address`.`sys_language_uid` IN (0, -1)) AND (`tt_address`.`t3ver_oid` = 0) AND (((`tt_address`.`hidden` = 0) AND (`tt_address`.`starttime` <= ' . $time . ') AND (((`tt_address`.`endtime` = 0) OR (`tt_address`.`endtime` > ' . $time . ')))) AND tt_address.deleted=0)'; } $this->assertEquals($sql, $result); }