Skip to content

Commit

Permalink
[TASK] Migrate test fixtures to CSV
Browse files Browse the repository at this point in the history
In order to use the latest TYPO3 Core Testing Framework,
all test fixtures need to be migrated to a CSV
format.

This change marks the first part for the migration.

See TYPO3-Solr#3614
  • Loading branch information
bmack committed Apr 25, 2023
1 parent 1d85dc4 commit 4af7bc0
Show file tree
Hide file tree
Showing 93 changed files with 872 additions and 3,252 deletions.
4 changes: 4 additions & 0 deletions Tests/Integration/Access/Fixtures/user_protected_page.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"pages",
,"uid","pid","is_siteroot","doktype","hidden","slug","extendToSubpages","title","fe_group"
,1,0,1,1,0,"/",1,"Root page visible but extended to subpages",
,10,1,0,1,0,"/protected",0,"Protected",4711
17 changes: 0 additions & 17 deletions Tests/Integration/Access/Fixtures/user_protected_page.xml

This file was deleted.

2 changes: 1 addition & 1 deletion Tests/Integration/Access/RootlineTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class RootlineTest extends IntegrationTest
*/
public function canGetAccessRootlineByPageId()
{
$this->importDataSetFromFixture('user_protected_page.xml');
$this->importCSVDataSet(__DIR__ . '/Fixtures/user_protected_page.csv');
$accessRootline = Rootline::getAccessRootlineByPageId(10);
self::assertSame('10:4711', (string)$accessRootline, 'Did not determine expected access rootline for fe_group protected page');

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"pages",
,"uid","pid","is_siteroot","doktype","slug","title","subtitle"
,2,1,0,1,"/products","Products",""
,3,2,0,1,"/shoes-and-socks","Shoes and Socks","Men"
,4,2,0,1,"/men/sweatshirts-and-jeans","Sweatshirts and Jeans","Men"
"tt_content",
,"uid","pid","colPos","CType","bodytext"
,1,3,0,"text","Our awesome new shoes and socks products prices starting at 10 euro"
,2,4,0,"text","Our awesome men jeans products prices starting at 50 euro"

This file was deleted.

6 changes: 6 additions & 0 deletions Tests/Integration/Controller/Fixtures/can_sort_by_metric.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"pages",
,"uid","pid","crdate","is_siteroot","doktype","slug","title","subtitle"
,9,2,0,0,1,"/men/t-shirts","T-Shirts","Men"
# This is the page with the highest creation date therefore pid 2 should be on the first position
,10,2,1535717680,0,1,"/men/t-shirts-new","T-Shirts","Men"
,11,3,0,0,1,"/men/t-shirts-2","T-Shirts","Men"
32 changes: 0 additions & 32 deletions Tests/Integration/Controller/Fixtures/can_sort_by_metric.xml

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"pages",
,"uid","pid","is_siteroot","doktype","slug","title","subtitle"
,2022,1,0,1,"/search","Search","Apache Solr for TYPO3 search page"
"tt_content",
,"uid","pid","colPos","frame_class","CType","list_type","sectionIndex"
,2022,2022,0,"default","list","solr_pi_results",1

This file was deleted.

16 changes: 16 additions & 0 deletions Tests/Integration/Controller/Fixtures/indexing_data.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"pages",
,"uid","pid","is_siteroot","doktype","slug","title","subtitle","author"
,2,1,0,1,"/men/socks","Socks","Men","Jane Doe"
,3,1,0,1,"/men/jeans","Jeans","Men","John Doe"
,4,1,0,1,"/women/shoes","Shoes","Woman","John Doe"
,5,1,0,1,"/women/t-shirts","T-Shirts","Woman","John Doe"
,6,1,0,1,"/men/t-shirts","T-Shirts","Men","Jane Doe"
,7,1,0,1,"/men/sweatshirts","Sweatshirts","Men","Jane Doe"
,8,1,0,1,"/women/sweatshirts","Sweatshirts","Woman","John Doe"
"tt_content",
,"uid","pid","colPos","CType","bodytext"
,2,2,0,"text","Our awesome new sock products prices starting at 10 euro"
,3,3,0,"text","Our awesome men jeans products prices starting at 50 euro"
"tx_solr_statistics",
,"pid","num_found","keywords"
,1,100,"shoes"
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"pages",
,"uid","pid","is_siteroot","doktype","slug","title"
,2,1,1,1,"/uri-special-chars","Uri Special Chars"
,3,1,0,1,"/some","Some/"
,4,1,0,1,"/some-large","Some/Large"
,5,1,0,1,"/some-large-path","Some/Large/Path"
Loading

0 comments on commit 4af7bc0

Please sign in to comment.