mirror of
https://github.com/FriendsOfTYPO3/tea.git
synced 2024-11-22 11:16:13 +01:00
[TASK] Migrate DB queries to CSV assertions in the functional tests (#998)
This makes the corresponding test a lot more concise and easier to read.
This commit is contained in:
parent
f604ec2682
commit
d15bd079d6
2 changed files with 4 additions and 10 deletions
|
@ -0,0 +1,3 @@
|
|||
"tx_tea_domain_model_product_tea"
|
||||
,"uid","title"
|
||||
,1,"Godesberger Burgtee"
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
@ -119,16 +119,7 @@ final class TeaRepositoryTest extends FunctionalTestCase
|
|||
$this->subject->add($model);
|
||||
$this->persistenceManager->persistAll();
|
||||
|
||||
$connection = $this->getConnectionPool()->getConnectionForTable('tx_tea_domain_model_product_tea');
|
||||
$databaseRow = $connection
|
||||
->executeQuery(
|
||||
'SELECT * FROM tx_tea_domain_model_product_tea WHERE uid = :uid',
|
||||
['uid' => $model->getUid()]
|
||||
)
|
||||
->fetchAssociative();
|
||||
|
||||
self::assertIsArray($databaseRow);
|
||||
self::assertSame($title, $databaseRow['title']);
|
||||
$this->assertCSVDataSet(__DIR__ . '/../Fixtures/Product/PersistedTea.csv');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue