mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-12-22 18:46:11 +01:00

[TASK] Convert functional test fixtures to CSV (#601)

Fixes #600

Co-authored-by: lina.wolf <lwolf@w-commerce.de>
This commit is contained in:
Lina Wolf 2022-10-03 19:10:08 +02:00 committed by GitHub
parent e469041db7
commit 8be6d02315
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 33 deletions

View file

@ -8,6 +8,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
### Added
### Changed
- Convert functional test fixtures to CSV (#601)
- Use typed properties instead of `@var` annotations (#599)
- Return `ResponseInterface` in controller actions (#597)
- Replace switchable controller actions with separate plugins (#575)

View file

@ -0,0 +1,8 @@
"tx_tea_domain_model_product_tea"
,"uid","pid","title","description","image"
,"1","1","Earl Grey","Fresh and hot.",0
,"2","1","Assam","Dark and strong.",0
,"3","1","Gunpowder","Bitter and very green.",1
"sys_file_reference"
,"uid","pid","uid_foreign","tablenames","fieldname"
,"1","1","3","tx_tea_domain_model_product_tea","image"
Can't render this file because it has a wrong number of fields in line 2.

View file

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<dataset>
<tx_tea_domain_model_product_tea>
<uid>1</uid>
<pid>1</pid>
<title>Earl Grey</title>
<description>Fresh and hot.</description>
</tx_tea_domain_model_product_tea>
<tx_tea_domain_model_product_tea>
<uid>2</uid>
<pid>1</pid>
<title>Assam</title>
<description>Dark and strong.</description>
</tx_tea_domain_model_product_tea>
<tx_tea_domain_model_product_tea>
<uid>3</uid>
<pid>1</pid>
<title>Gunpowder</title>
<description>Bitter and very green.</description>
<image>1</image>
</tx_tea_domain_model_product_tea>
<sys_file_reference>
<uid>1</uid>
<pid>1</pid>
<uid_foreign>3</uid_foreign>
<tablenames>tx_tea_domain_model_product_tea</tablenames>
<fieldname>image</fieldname>
</sys_file_reference>
</dataset>

View file

@ -57,7 +57,7 @@ class TeaRepositoryTest extends FunctionalTestCase
*/
public function findAllWithRecordsFindsRecordsFromAllPages(): void
{
$this->importDataSet(__DIR__ . '/../Fixtures/Product/Tea.xml');
$this->importCSVDataSet(__DIR__ . '/../Fixtures/Product/Tea.csv');
$result = $this->subject->findAll();
@ -69,7 +69,7 @@ class TeaRepositoryTest extends FunctionalTestCase
*/
public function findAllSortsByTitleInAscendingOrder(): void
{
$this->importDataSet(__DIR__ . '/../Fixtures/Product/Tea.xml');
$this->importCSVDataSet(__DIR__ . '/../Fixtures/Product/Tea.csv');
$result = $this->subject->findAll();
@ -82,7 +82,7 @@ class TeaRepositoryTest extends FunctionalTestCase
*/
public function findByUidForExistingRecordReturnsModelWithData(): void
{
$this->importDataSet(__DIR__ . '/../Fixtures/Product/Tea.xml');
$this->importCSVDataSet(__DIR__ . '/../Fixtures/Product/Tea.csv');
$uid = 1;
/** @var Tea $model */
@ -98,7 +98,7 @@ class TeaRepositoryTest extends FunctionalTestCase
*/
public function fillsImageRelation(): void
{
$this->importDataSet(__DIR__ . '/../Fixtures/Product/Tea.xml');
$this->importCSVDataSet(__DIR__ . '/../Fixtures/Product/Tea.csv');
$uid = 3;
/** @var Tea $model */