mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-12-22 18:46:11 +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:
Oliver Klee 2023-11-19 22:34:02 +01:00 committed by GitHub
parent f604ec2682
commit d15bd079d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 10 deletions

View file

@ -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.

View file

@ -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');
}
/**