mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-11-24 14:16:15 +01:00

Fix broken functional test

SQLite does reset the UID autoincrement during deletion.
That way the assertions do not match.
We now use a different set up and remove the uids from assertions.

That way we still ensure that the imported data is removed and new data
is imported. We do not need to care about UID.
This commit is contained in:
Daniel Siepmann 2024-07-30 19:51:15 +02:00 committed by Karsten Nowak
parent 271bd24c4f
commit 13b1116532
3 changed files with 8 additions and 4 deletions

View file

@ -92,7 +92,7 @@ class CreateTestDataCommandTest extends FunctionalTestCase
*/
public function testDataGetsDeletedBeforeNewDataCreated(): void
{
$this->importCSVDataSet(__DIR__ . '/Fixtures/Database/Teas.csv');
$this->importCSVDataSet(__DIR__ . '/Fixtures/Database/ExistingTeas.csv');
$this->commandTester->execute(
[
'pageUid' => '1',

View file

@ -0,0 +1,4 @@
"tx_tea_domain_model_tea"
,"uid","pid","title","description","deleted"
,1,1,"Darjeeling","Which already existed in the system",0
,2,1,"Earl Grey","Which already existed in the system",0
Can't render this file because it has a wrong number of fields in line 2.

View file

@ -1,4 +1,4 @@
"tx_tea_domain_model_tea"
,"uid","pid","title","description","deleted"
,3,1,"Darjeeling","I love that tea!",0
,4,1,"Earl Grey","A nice tea!",0
,"pid","title","description","deleted"
,1,"Darjeeling","I love that tea!",0
,1,"Earl Grey","A nice tea!",0

Can't render this file because it has a wrong number of fields in line 2.