mirror of
https://github.com/FriendsOfTYPO3/tea.git
synced 2024-11-22 17:36:12 +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->subject->add($model);
|
||||||
$this->persistenceManager->persistAll();
|
$this->persistenceManager->persistAll();
|
||||||
|
|
||||||
$connection = $this->getConnectionPool()
|
$connection = $this->getConnectionPool()->getConnectionForTable('tx_tea_domain_model_product_tea');
|
||||||
->getConnectionForTable('tx_tea_domain_model_product_tea');
|
|
||||||
$databaseRow = $connection
|
$databaseRow = $connection
|
||||||
->executeQuery(
|
->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();
|
->fetchAssociative();
|
||||||
|
|
||||||
|
self::assertIsArray($databaseRow);
|
||||||
self::assertSame($title, $databaseRow['title']);
|
self::assertSame($title, $databaseRow['title']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue