mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-09-19 03:36:12 +02: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
parent 9902677e84
commit 5e40f6f105
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
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.