mirror of
https://github.com/FriendsOfTYPO3/tea.git
synced 2024-12-22 18:46:11 +01:00
[CLEANUP] Use prepared statements for SQL queries in the tests (#443)
Also add another type check to help with debugging failed queries.
This commit is contained in:
parent
6d6b196426
commit
f1a0fbef04
1 changed files with 4 additions and 3 deletions
|
@ -129,14 +129,15 @@ class TeaRepositoryTest extends FunctionalTestCase
|
|||
$this->subject->add($model);
|
||||
$this->persistenceManager->persistAll();
|
||||
|
||||
$connection = $this->getConnectionPool()
|
||||
->getConnectionForTable('tx_tea_domain_model_product_tea');
|
||||
$connection = $this->getConnectionPool()->getConnectionForTable('tx_tea_domain_model_product_tea');
|
||||
$databaseRow = $connection
|
||||
->executeQuery(
|
||||
'SELECT * FROM tx_tea_domain_model_product_tea WHERE uid = ' . $model->getUid()
|
||||
'SELECT * FROM tx_tea_domain_model_product_tea WHERE uid = :uid',
|
||||
['uid' => $model->getUid()]
|
||||
)
|
||||
->fetchAssociative();
|
||||
|
||||
self::assertIsArray($databaseRow);
|
||||
self::assertSame($title, $databaseRow['title']);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue