From 3ca00b78e44ab61fbe1b2fbc64a0cb7e6ca47ab5 Mon Sep 17 00:00:00 2001 From: Mathias Bolt Lesniak Date: Mon, 11 Apr 2022 14:15:43 +0200 Subject: [PATCH] [BUGFIX] Use `executeQuery()` in functional test example (#422) This avoids potential false results in the tests because it doesn't add additional restrictions for starttime, endtime, deleted, and hidden. Fixes #421 --- .../Domain/Repository/Product/TeaRepositoryTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Tests/Functional/Domain/Repository/Product/TeaRepositoryTest.php b/Tests/Functional/Domain/Repository/Product/TeaRepositoryTest.php index 9b4e5ca..b956b91 100644 --- a/Tests/Functional/Domain/Repository/Product/TeaRepositoryTest.php +++ b/Tests/Functional/Domain/Repository/Product/TeaRepositoryTest.php @@ -131,7 +131,10 @@ class TeaRepositoryTest extends FunctionalTestCase $connection = $this->getConnectionPool() ->getConnectionForTable('tx_tea_domain_model_product_tea'); - $databaseRow = $connection->select(['*'], 'tx_tea_domain_model_product_tea', ['uid' => $model->getUid()]) + $databaseRow = $connection + ->executeQuery( + 'SELECT * FROM tx_tea_domain_model_product_tea WHERE uid = ' . $model->getUid() + ) ->fetchAssociative(); self::assertSame($title, $databaseRow['title']);