mirror of
https://github.com/FriendsOfTYPO3/tea.git
synced 2024-11-23 13:36:13 +01:00
[TASK] Check that existing teas in other pids were not deleted
Related #1120
This commit is contained in:
parent
13b1116532
commit
a4ba103993
4 changed files with 27 additions and 6 deletions
|
@ -103,4 +103,19 @@ class CreateTestDataCommandTest extends FunctionalTestCase
|
|||
self::assertCSVDataSet(__DIR__ . '/Fixtures/Database/TeasAfterDelete.csv');
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function existingDataWillBeNotDeleted(): void
|
||||
{
|
||||
$this->importCSVDataSet(__DIR__ . '/Fixtures/Database/OtherExistingTeas.csv');
|
||||
$this->commandTester->execute(
|
||||
[
|
||||
'pageUid' => '1',
|
||||
'--delete-data-before' => true,
|
||||
]
|
||||
);
|
||||
self::assertCSVDataSet(__DIR__ . '/Fixtures/Database/TeasAfterDeleteOtherExistingTeas.csv');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
"tx_tea_domain_model_tea"
|
||||
,"uid","pid","title","description","deleted"
|
||||
,3,1,"Darjeeling","Exists and should be deleted","0"
|
||||
,4,1,"Earl Grey","Exists and should be deleted","0"
|
||||
,1,2,"Darjeeling","Which already existed in the system",0
|
||||
,2,2,"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.
|
|
@ -1,6 +0,0 @@
|
|||
"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"
|
||||
,1,2,"Black tea","I hate that.","0"
|
||||
,2,2,"Green tea","Is ok.","0"
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
@ -0,0 +1,6 @@
|
|||
"tx_tea_domain_model_tea"
|
||||
,"pid","title","description","deleted"
|
||||
,1,"Darjeeling","I love that tea!",0
|
||||
,1,"Earl Grey","A nice tea!",0
|
||||
,2,"Darjeeling","Which already existed in the system",0
|
||||
,2,"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.
|
Loading…
Reference in a new issue