diff --git a/Tests/Integration/Access/Fixtures/user_protected_page.csv b/Tests/Integration/Access/Fixtures/user_protected_page.csv
new file mode 100644
index 0000000000..c615c0b71c
--- /dev/null
+++ b/Tests/Integration/Access/Fixtures/user_protected_page.csv
@@ -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
diff --git a/Tests/Integration/Access/Fixtures/user_protected_page.xml b/Tests/Integration/Access/Fixtures/user_protected_page.xml
deleted file mode 100644
index d12463ee07..0000000000
--- a/Tests/Integration/Access/Fixtures/user_protected_page.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
- 1
- 1
- 1
- 0
- 1
-
-
- 10
- 0
- 1
- 1
- 4711
-
-
\ No newline at end of file
diff --git a/Tests/Integration/Access/RootlineTest.php b/Tests/Integration/Access/RootlineTest.php
index 49f16f5e75..ca755904de 100644
--- a/Tests/Integration/Access/RootlineTest.php
+++ b/Tests/Integration/Access/RootlineTest.php
@@ -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');
diff --git a/Tests/Integration/Controller/Backend/Search/Fixtures/can_reload_index_configuration.xml b/Tests/Integration/Controller/Backend/Search/Fixtures/can_reload_index_configuration.xml
deleted file mode 100644
index c6614b2e79..0000000000
--- a/Tests/Integration/Controller/Backend/Search/Fixtures/can_reload_index_configuration.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
- 1
- 1
- 1
- 3
-
-
-
-
-
-
- 100
- 0
-
-
-
- 1
- 1
-
-
- 2
- 1
-
-
-
diff --git a/Tests/Integration/Controller/Fixtures/SearchAndSuggestControllerTest_indexing_data.xml b/Tests/Integration/Controller/Fixtures/SearchAndSuggestControllerTest_indexing_data.xml
deleted file mode 100644
index ba54a97354..0000000000
--- a/Tests/Integration/Controller/Fixtures/SearchAndSuggestControllerTest_indexing_data.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
- 2
- 1
- 0
- 1
- Socks
- Men
- /men/socks
-
-
- 3
- 1
- 0
- 1
- Jeans
- Men
- /men/jeans
-
-
- 4
- 1
- 0
- 1
- Shoes
- Woman
- /women/shoes
-
-
- 5
- 1
- 0
- 1
- T-Shirts
- Woman
- /women/t-shirts
-
-
- 6
- 1
- 0
- 1
- T-Shirts
- Men
- /men/t-shirts
-
-
- 7
- 1
- 0
- 1
- Sweatshirts
- Men
- /men/sweat-shirts
-
-
- 8
- 1
- 0
- 1
- Sweatshirts
- Woman
- /woman/sweat-shirts
-
-
-
- 2
- 2
- text
- Our awesome new sock products prices starting at 10 euro
- 0
-
-
-
- 3
- 3
- text
- Our awesome men jeans products prices starting at 50 euro
- 0
-
-
-
- 1
- 100
- shoes
-
-
diff --git a/Tests/Integration/Controller/Fixtures/can_render_path_facet_with_search_controller.csv b/Tests/Integration/Controller/Fixtures/can_render_path_facet_with_search_controller.csv
new file mode 100644
index 0000000000..ccdc9c1cc5
--- /dev/null
+++ b/Tests/Integration/Controller/Fixtures/can_render_path_facet_with_search_controller.csv
@@ -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"
diff --git a/Tests/Integration/Controller/Fixtures/can_render_path_facet_with_search_controller.xml b/Tests/Integration/Controller/Fixtures/can_render_path_facet_with_search_controller.xml
deleted file mode 100644
index 96bf8b8546..0000000000
--- a/Tests/Integration/Controller/Fixtures/can_render_path_facet_with_search_controller.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
- 2
- 1
- 0
- 1
- Products
- /products
-
-
- 3
- 2
- 0
- 1
- Shoes and Socks
- Men
- /shows-and-socks
-
-
- 4
- 2
- 0
- 1
- Sweatshirts and Jeans
- Men
- /men/sweatshirts-and-jeans
-
-
-
- 1
- 3
- text
- Our awesome new shoes and socks products prices starting at 10 euro
- 0
-
-
-
- 2
- 4
- text
- Our awesome men jeans products prices starting at 50 euro
- 0
-
-
diff --git a/Tests/Integration/Controller/Fixtures/can_sort_by_metric.csv b/Tests/Integration/Controller/Fixtures/can_sort_by_metric.csv
new file mode 100644
index 0000000000..f31542f39c
--- /dev/null
+++ b/Tests/Integration/Controller/Fixtures/can_sort_by_metric.csv
@@ -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"
diff --git a/Tests/Integration/Controller/Fixtures/can_sort_by_metric.xml b/Tests/Integration/Controller/Fixtures/can_sort_by_metric.xml
deleted file mode 100644
index 3bc9786e42..0000000000
--- a/Tests/Integration/Controller/Fixtures/can_sort_by_metric.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
- 9
- 2
- 0
- 1
- T-Shirts
- Men
- /men/t-shirts
-
-
-
- 10
- 2
- 1535717680
- 0
- 1
- T-Shirts
- Men
- /men/t-shirts-1
-
-
- 11
- 3
- 0
- 1
- T-Shirts
- Men
- /men/t-shirts-2
-
-
diff --git a/Tests/Integration/Controller/Fixtures/can_suggest_with_uri_special_chars.xml b/Tests/Integration/Controller/Fixtures/can_suggest_with_uri_special_chars.xml
deleted file mode 100644
index 22812b4046..0000000000
--- a/Tests/Integration/Controller/Fixtures/can_suggest_with_uri_special_chars.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
- 2
- 1
- 1
- 1
- Uri Special Chars
- /uri-special-chars
-
-
-
- 3
- 1
- Some/
- 0
- 1
- /some
-
-
- 4
- 1
- Some/Large
- 0
- 1
- /some-large
-
-
-
- 5
- 1
- Some/Large/Path
- 0
- 1
- /some-large-path
-
-
diff --git a/Tests/Integration/Controller/Fixtures/default_search_results_plugin.csv b/Tests/Integration/Controller/Fixtures/default_search_results_plugin.csv
new file mode 100644
index 0000000000..956a00fa8f
--- /dev/null
+++ b/Tests/Integration/Controller/Fixtures/default_search_results_plugin.csv
@@ -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
diff --git a/Tests/Integration/Controller/Fixtures/default_search_results_plugin.xml b/Tests/Integration/Controller/Fixtures/default_search_results_plugin.xml
deleted file mode 100644
index 5283065dbd..0000000000
--- a/Tests/Integration/Controller/Fixtures/default_search_results_plugin.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
- 2022
- 1
- 0
- 1
- Search
- Apache Solr for TYPO3 search page
- /search
-
-
-
- 2022
- 2022
- default
- list
- solr_pi_results
- 1
- 0
-
-
diff --git a/Tests/Integration/Controller/Fixtures/indexing_data.csv b/Tests/Integration/Controller/Fixtures/indexing_data.csv
new file mode 100644
index 0000000000..06a959161b
--- /dev/null
+++ b/Tests/Integration/Controller/Fixtures/indexing_data.csv
@@ -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"
diff --git a/Tests/Integration/Controller/Fixtures/suggest_with_uri_special_chars.csv b/Tests/Integration/Controller/Fixtures/suggest_with_uri_special_chars.csv
new file mode 100644
index 0000000000..f7c12e40ca
--- /dev/null
+++ b/Tests/Integration/Controller/Fixtures/suggest_with_uri_special_chars.csv
@@ -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"
diff --git a/Tests/Integration/Controller/SearchControllerTest.php b/Tests/Integration/Controller/SearchControllerTest.php
index ec58021e14..d426ed23b3 100644
--- a/Tests/Integration/Controller/SearchControllerTest.php
+++ b/Tests/Integration/Controller/SearchControllerTest.php
@@ -67,7 +67,7 @@ protected function setUp(): void
*/
protected function bootstrapSearchResultsPluginOnPage(): void
{
- $this->importDataSetFromFixture('default_search_results_plugin.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/default_search_results_plugin.csv');
$this->addTypoScriptToTemplateRecord(
1,
/* @lang TYPO3_TypoScript */
@@ -114,7 +114,7 @@ public function canShowSearchForm()
*/
public function canSearchForPrices()
{
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->indexPages([2, 3]);
$result = (string)$this->executeFrontendSubRequest(
@@ -132,7 +132,7 @@ public function canSearchForPrices()
*/
public function canDoAPaginatedSearch()
{
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->addTypoScriptToTemplateRecord(
1,
/* @lang TYPO3_TypoScript */
@@ -184,7 +184,7 @@ protected function assertCanChangeResultsPerPage()
*/
public function canGetADidYouMeanProposalForATypo()
{
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->addTypoScriptToTemplateRecord(
1,
/* @lang TYPO3_TypoScript */
@@ -211,7 +211,7 @@ public function canGetADidYouMeanProposalForATypo()
*/
public function canAutoCorrectATypo()
{
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->addTypoScriptToTemplateRecord(
1,
/* @lang TYPO3_TypoScript */
@@ -242,7 +242,7 @@ public function canAutoCorrectATypo()
*/
public function canRenderAFacetWithFluid()
{
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->addTypoScriptToTemplateRecord(
1,
@@ -277,7 +277,7 @@ public function canRenderAFacetWithFluid()
*/
public function canDoAnInitialEmptySearchWithoutResults()
{
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->addTypoScriptToTemplateRecord(
1,
/* @lang TYPO3_TypoScript */
@@ -308,7 +308,7 @@ public function canDoAnInitialEmptySearchWithoutResults()
*/
public function canDoAnInitialEmptySearchWithResults()
{
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->addTypoScriptToTemplateRecord(
1,
/* @lang TYPO3_TypoScript */
@@ -341,7 +341,7 @@ public function canDoAnInitialEmptySearchWithResults()
public function canDoAnInitialSearchWithoutResults()
{
self::markTestSkipped('Something is wrong with refactored pagination. See https://github.com/TYPO3-Solr/ext-solr/issues/3150');
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->addTypoScriptToTemplateRecord(
1,
/* @lang TYPO3_TypoScript */
@@ -372,7 +372,7 @@ public function canDoAnInitialSearchWithoutResults()
*/
public function canDoAnInitialSearchWithResults()
{
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->addTypoScriptToTemplateRecord(
1,
/* @lang TYPO3_TypoScript */
@@ -403,7 +403,7 @@ public function canDoAnInitialSearchWithResults()
*/
public function removeOptionLinkWillBeShownWhenFacetWasSelected()
{
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->addTypoScriptToTemplateRecord(
1,
/* @lang TYPO3_TypoScript */
@@ -436,7 +436,7 @@ public function removeOptionLinkWillBeShownWhenFacetWasSelected()
*/
public function removeOptionLinkWillBeShownWhenAFacetOptionLeadsToAZeroResults()
{
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->addTypoScriptToTemplateRecord(
1,
/* @lang TYPO3_TypoScript */
@@ -468,7 +468,7 @@ public function removeOptionLinkWillBeShownWhenAFacetOptionLeadsToAZeroResults()
*/
public function canFilterOnPageSections()
{
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->addTypoScriptToTemplateRecord(
1,
/* @lang TYPO3_TypoScript */
@@ -499,7 +499,7 @@ public function exceptionWillBeThrownWhenAWrongTemplateIsConfiguredForTheFacet()
$this->expectException(InvalidTemplateResourceException::class);
$this->expectExceptionMessageMatches('#(.*The partial files.*NotFound.*|.*The Fluid template files .*NotFound.*)#');
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->addTypoScriptToTemplateRecord(
1,
/* @lang TYPO3_TypoScript */
@@ -529,7 +529,7 @@ public function exceptionWillBeThrownWhenAWrongTemplateIsConfiguredForTheFacet()
*/
public function canRenderAScoreAnalysisWhenBackendUserIsLoggedIn()
{
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->indexPages([1, 2]);
@@ -551,7 +551,7 @@ public function canRenderAScoreAnalysisWhenBackendUserIsLoggedIn()
*/
public function canSortFacetsByLex()
{
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->addTypoScriptToTemplateRecord(
1,
/* @lang TYPO3_TypoScript */
@@ -608,7 +608,7 @@ public function canSortFacetsByLex()
*/
public function canSortFacetsByOptionCountWhenNothingIsConfigured()
{
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->addTypoScriptToTemplateRecord(
1,
/* @lang TYPO3_TypoScript */
@@ -664,7 +664,7 @@ public function canSortFacetsByOptionCountWhenNothingIsConfigured()
*/
public function canRenderQueryGroupFacet()
{
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->addTypoScriptToTemplateRecord(
1,
/* @lang TYPO3_TypoScript */
@@ -763,7 +763,7 @@ protected function addPageHierarchyFacetConfiguration(): void
*/
public function canRenderHierarchicalFacet()
{
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->addPageHierarchyFacetConfiguration();
$this->indexPages([1, 2, 3, 4, 5, 6, 7, 8]);
@@ -785,7 +785,7 @@ public function canRenderHierarchicalFacet()
*/
public function canFacetOnHierarchicalFacetItem()
{
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->addPageHierarchyFacetConfiguration();
$this->indexPages([1, 2, 3, 4, 5, 6, 7, 8]);
@@ -807,7 +807,7 @@ public function canFacetOnHierarchicalFacetItem()
*/
public function canFacetOnHierarchicalTextCategory()
{
- $this->importDataSetFromFixture('can_render_path_facet_with_search_controller.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/can_render_path_facet_with_search_controller.csv');
$this->addTypoScriptToTemplateRecord(
1,
@@ -859,7 +859,7 @@ public function canFacetOnHierarchicalTextCategory()
*/
public function canDefineAManualSortOrder()
{
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->addTypoScriptToTemplateRecord(
1,
/* @lang TYPO3_TypoScript */
@@ -914,7 +914,7 @@ public function canDefineAManualSortOrder()
*/
public function canSeeTheParsedQueryWhenABackendUserIsLoggedIn()
{
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->addTypoScriptToTemplateRecord(
1,
/* @lang TYPO3_TypoScript */
@@ -993,7 +993,7 @@ public function canShowLastSearchesFromSessionInResponse()
'Last searches component seems to be fine, but the test does not fit that case currently.
The last-searches component is not rendered. See: https://github.com/TYPO3-Solr/ext-solr/issues/3160'
);
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->addTypoScriptToTemplateRecord(
1,
/* @lang TYPO3_TypoScript */
@@ -1026,7 +1026,7 @@ public function canShowLastSearchesFromSessionInResponse()
*/
public function canShowLastSearchesFromDatabaseInResponse()
{
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->addTypoScriptToTemplateRecord(
1,
/* @lang TYPO3_TypoScript */
@@ -1058,7 +1058,7 @@ public function canShowLastSearchesFromDatabaseInResponse()
*/
public function canNotStoreQueyStringInLastSearchesWhenQueryDoesNotReturnAResult()
{
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->addTypoScriptToTemplateRecord(
1,
/* @lang TYPO3_TypoScript */
@@ -1091,8 +1091,7 @@ public function canNotStoreQueyStringInLastSearchesWhenQueryDoesNotReturnAResult
*/
public function canOverwriteAFilterWithTheFlexformSettings()
{
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
-
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->indexPages([1, 2, 3, 4, 5, 6, 7, 8]);
$connection = $this->getConnectionPool()->getConnectionForTable('tt_content');
@@ -1116,7 +1115,7 @@ public function canOverwriteAFilterWithTheFlexformSettings()
*/
public function canRenderDateRangeFacet()
{
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->addTypoScriptToTemplateRecord(
1,
/* @lang TYPO3_TypoScript */
@@ -1146,7 +1145,7 @@ public function canRenderDateRangeFacet()
*/
public function canRenderASecondFacetOnTheTypeField()
{
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->addTypoScriptToTemplateRecord(
1,
/* @lang TYPO3_TypoScript */
@@ -1182,8 +1181,8 @@ public function canRenderASecondFacetOnTheTypeField()
*/
public function canSortByMetric()
{
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
- $this->importDataSetFromFixture('can_sort_by_metric.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/can_sort_by_metric.csv');
$this->addTypoScriptToTemplateRecord(
1,
@@ -1253,7 +1252,7 @@ public function formActionIsRenderingTheForm()
public function searchingAndRenderingFrequentSearchesIsShowingTheTermAsFrequentSearch()
{
self::markTestIncomplete('See: https://github.com/TYPO3-Solr/ext-solr/issues/3166');
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->indexPages([2]);
$this->getConnectionPool()->getConnectionForTable('tt_content')
@@ -1277,7 +1276,7 @@ public function searchingAndRenderingFrequentSearchesIsShowingTheTermAsFrequentS
*/
public function canRenderDetailAction()
{
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->indexPages([2]);
$resultPage = (string)$this->executeFrontendSubRequest(
diff --git a/Tests/Integration/Controller/SuggestControllerTest.php b/Tests/Integration/Controller/SuggestControllerTest.php
index d7e60877fb..40c40723b2 100644
--- a/Tests/Integration/Controller/SuggestControllerTest.php
+++ b/Tests/Integration/Controller/SuggestControllerTest.php
@@ -24,7 +24,6 @@
* Integration testcase to test for {@link SuggestController}
*
* @author Timo Hund
- * @copyright (c) 2018 Timo Hund
* @group frontend
*/
class SuggestControllerTest extends AbstractFrontendController
@@ -62,7 +61,7 @@ protected function setUp(): void
*/
public function canDoABasicSuggest()
{
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->indexPages([1, 2, 3, 4, 5, 6, 7, 8]);
$result = (string)($this->executeFrontendSubRequestForSuggestQueryString('Sweat', 'rand')->getBody());
@@ -76,12 +75,12 @@ public function canDoABasicSuggest()
*/
public function canDoABasicSuggestWithoutCallback()
{
- $this->importDataSetFromFixture('SearchAndSuggestControllerTest_indexing_data.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/indexing_data.csv');
$this->indexPages([1, 2, 3, 4, 5, 6, 7, 8]);
$result = (string)($this->executeFrontendSubRequestForSuggestQueryString('Sweat')->getBody());
- //we assume to get suggestions like Sweatshirt
+ // we assume to get suggestions like Sweatshirt
self::assertStringContainsString('suggestions":{"sweatshirts":2}', $result, 'Response did not contain sweatshirt suggestions');
}
@@ -90,7 +89,7 @@ public function canDoABasicSuggestWithoutCallback()
*/
public function canSuggestWithUriSpecialChars()
{
- $this->importDataSetFromFixture('can_suggest_with_uri_special_chars.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/suggest_with_uri_special_chars.csv');
$this->addTypoScriptToTemplateRecord(
1,
diff --git a/Tests/Integration/Domain/Index/Fixtures/can_index_custom_record_withBasePrefix_foo.csv b/Tests/Integration/Domain/Index/Fixtures/can_index_custom_record_withBasePrefix_foo.csv
new file mode 100644
index 0000000000..086dcd0801
--- /dev/null
+++ b/Tests/Integration/Domain/Index/Fixtures/can_index_custom_record_withBasePrefix_foo.csv
@@ -0,0 +1,61 @@
+"pages",
+,"uid","pid","is_siteroot","doktype","slug","title"
+,1,0,1,1,"/","Root page"
+"tx_fakeextension_domain_model_bar",
+,"uid","pid","title","category","tstamp"
+,111,1,"testnews",4711,111111
+"tx_fakeextension_domain_model_directrelated",
+,"uid","pid","category"
+,4711,1,"The category"
+"sys_template",
+,"uid","pid","root","clear","sorting","config"
+,1,1,1,3,100,"
+page = PAGE
+page.typeNum = 0
+
+# very simple rendering
+page.10 = CONTENT
+page.10 {
+ table = tt_content
+ select.orderBy = sorting
+ select.where = colPos=0
+ renderObj = COA
+ renderObj {
+ 10 = TEXT
+ 10.field = bodytext
+ }
+}
+
+plugin.tx_solr {
+
+ enabled = 1
+
+ index {
+ fieldProcessingInstructions {
+ changed = timestampToIsoDate
+ created = timestampToIsoDate
+ endtime = timestampToUtcIsoDate
+ rootline = pageUidToHierarchy
+ pageHierarchy_stringM = pathToHierarchy
+ }
+
+ queue {
+ foo = 1
+ foo {
+ table = tx_fakeextension_domain_model_bar
+
+ fields {
+ title = title
+ url = TEXT
+ url {
+ typolink.parameter = 1
+ typolink.additionalParams = &tx_ttnews[tt_news]={field:uid}&L={field:__solr_index_language}
+ typolink.additionalParams.insertData = 1
+ typolink.returnLast = url
+ typolink.useCacheHash = 1
+ }
+ }
+ }
+ }
+ }
+}"
diff --git a/Tests/Integration/Domain/Index/Fixtures/can_index_custom_record_withBasePrefix_foo.xml b/Tests/Integration/Domain/Index/Fixtures/can_index_custom_record_withBasePrefix_foo.xml
deleted file mode 100644
index 4925051fe4..0000000000
--- a/Tests/Integration/Domain/Index/Fixtures/can_index_custom_record_withBasePrefix_foo.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
-
-
-
- 1
- 1
- 1
- 3
-
-
-
- # very simple rendering
- page.10 = CONTENT
- page.10 {
- table = tt_content
- select.orderBy = sorting
- select.where = colPos=0
- renderObj = COA
- renderObj {
- 10 = TEXT
- 10.field = bodytext
- }
- }
-
- plugin.tx_solr {
-
- enabled = 1
-
- index {
- fieldProcessingInstructions {
- changed = timestampToIsoDate
- created = timestampToIsoDate
- endtime = timestampToUtcIsoDate
- rootline = pageUidToHierarchy
- pageHierarchy_stringM = pathToHierarchy
- }
-
- queue {
- foo = 1
- foo {
- table = tx_fakeextension_domain_model_bar
-
- fields {
- title = title
- url = TEXT
- url {
- typolink.parameter = 1
- typolink.additionalParams = &tx_ttnews[tt_news]={field:uid}&L={field:__solr_index_language}
- typolink.additionalParams.insertData = 1
- typolink.returnLast = url
- typolink.useCacheHash = 1
- }
- }
- }
- }
- }
- }
- ]]>
-
- 100
-
-
- 1
- 1
- 1
-
-
- 111
- 1
- testnews
- 4711
- 111111
-
-
-
- 4711
- 1
- the category
-
-
\ No newline at end of file
diff --git a/Tests/Integration/Domain/Index/IndexServiceTest.php b/Tests/Integration/Domain/Index/IndexServiceTest.php
index 70abccde2d..f0dee847ef 100644
--- a/Tests/Integration/Domain/Index/IndexServiceTest.php
+++ b/Tests/Integration/Domain/Index/IndexServiceTest.php
@@ -100,7 +100,7 @@ public function canResolveBaseAsPrefix(string $absRefPrefix, string $expectedUrl
{
$this->cleanUpSolrServerAndAssertEmpty();
- $this->importDataSetFromFixture('can_index_custom_record_withBasePrefix_' . $absRefPrefix . '.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/can_index_custom_record_withBasePrefix_' . $absRefPrefix . '.csv');
$this->mergeSiteConfiguration('integration_tree_one', ['base' => '/' . $absRefPrefix . '/']);
diff --git a/Tests/Integration/Domain/Index/Queue/Fixtures/can_count_items.xml b/Tests/Integration/Domain/Index/Queue/Fixtures/can_count_items.xml
deleted file mode 100644
index 51ec3757fc..0000000000
--- a/Tests/Integration/Domain/Index/Queue/Fixtures/can_count_items.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
-
- 4711
- 1
- pages
- 1
- pages
- 0
- 0
- 1449151778
- 0
-
-
-
-
- 4712
- 2
- pages
- 2
- pages
- 0
- 0
- 1449151778
- 0
-
-
-
-
-
- 4713
- 3
- pages
- 3
- pages
- 0
- 0
- 1449151778
- 0
-
-
-
-
-
- 4714
- 4
- pages
- 4
- pages
- 0
- 0
- 1449151778
- 0
-
-
-
-
-
-
- 4715
- 2
- tx_news_domain_model_news
- 1
- news
- 0
- 0
- 1449151778
- 0
-
-
-
-
-
- 4716
- 3
- tx_news_domain_model_news
- 1
- news
- 0
- 0
- 1449151778
- 0
-
-
-
-
-
\ No newline at end of file
diff --git a/Tests/Integration/Domain/Index/Queue/Fixtures/can_delete_item_by_type.xml b/Tests/Integration/Domain/Index/Queue/Fixtures/can_delete_item_by_type.xml
deleted file mode 100644
index 51ec3757fc..0000000000
--- a/Tests/Integration/Domain/Index/Queue/Fixtures/can_delete_item_by_type.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
-
- 4711
- 1
- pages
- 1
- pages
- 0
- 0
- 1449151778
- 0
-
-
-
-
- 4712
- 2
- pages
- 2
- pages
- 0
- 0
- 1449151778
- 0
-
-
-
-
-
- 4713
- 3
- pages
- 3
- pages
- 0
- 0
- 1449151778
- 0
-
-
-
-
-
- 4714
- 4
- pages
- 4
- pages
- 0
- 0
- 1449151778
- 0
-
-
-
-
-
-
- 4715
- 2
- tx_news_domain_model_news
- 1
- news
- 0
- 0
- 1449151778
- 0
-
-
-
-
-
- 4716
- 3
- tx_news_domain_model_news
- 1
- news
- 0
- 0
- 1449151778
- 0
-
-
-
-
-
\ No newline at end of file
diff --git a/Tests/Integration/Domain/Index/Queue/Fixtures/can_delete_item_by_type_and_uid.xml b/Tests/Integration/Domain/Index/Queue/Fixtures/can_delete_item_by_type_and_uid.xml
deleted file mode 100644
index e8e28ec0cf..0000000000
--- a/Tests/Integration/Domain/Index/Queue/Fixtures/can_delete_item_by_type_and_uid.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- 4711
- 1
- pages
- 1
- pages
- 0
- 0
- 1449151778
- 0
-
-
-
-
- 4712
- 2
- pages
- 1
- pages
- 0
- 0
- 1449151778
- 0
-
-
-
-
-
- 4713
- 3
- pages
- 1
- pages
- 0
- 0
- 1449151778
- 0
-
-
-
-
-
-
- 4714
- 1
- tx_news_domain_model_news
- 1
- news
- 0
- 0
- 1449151778
- 0
-
-
-
-
- 4715
- 2
- tx_news_domain_model_news
- 1
- news
- 0
- 0
- 1449151778
- 0
-
-
-
-
-
- 4716
- 3
- tx_news_domain_model_news
- 1
- news
- 0
- 0
- 1449151778
- 0
-
-
-
-
-
\ No newline at end of file
diff --git a/Tests/Integration/Domain/Index/Queue/Fixtures/can_find_items.xml b/Tests/Integration/Domain/Index/Queue/Fixtures/can_find_items.xml
deleted file mode 100644
index b6053475f2..0000000000
--- a/Tests/Integration/Domain/Index/Queue/Fixtures/can_find_items.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-
-
-
- 1
-
-
- 2
-
-
- 3
-
-
- 4
-
-
-
-
- 4711
- 1
- pages
- 1
- pages
- 0
- 0
- 1449151778
- 0
-
-
-
-
- 4712
- 2
- pages
- 2
- pages
- 0
- 0
- 1449151778
- 0
-
-
-
-
-
- 4713
- 3
- pages
- 3
- pages
- 0
- 0
- 1449151778
- 0
-
-
-
-
-
- 4714
- 4
- pages
- 4
- pages
- 0
- 0
- 1449151778
- 0
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Tests/Integration/Domain/Index/Queue/Fixtures/can_flush_error_by_item.csv b/Tests/Integration/Domain/Index/Queue/Fixtures/can_flush_error_by_item.csv
new file mode 100644
index 0000000000..7e88cb9663
--- /dev/null
+++ b/Tests/Integration/Domain/Index/Queue/Fixtures/can_flush_error_by_item.csv
@@ -0,0 +1,6 @@
+"tx_solr_indexqueue_item",
+,"uid","root","item_type","errors","indexed"
+,4711,1,"pages","",1489507500
+,4712,1,"pages","something very bad happenend on site 1",0
+,4713,2,"pages","something bad happpend on site 2",1489507800
+,4714,1,"pages","another error in site 1",1489507800
diff --git a/Tests/Integration/Domain/Index/Queue/Fixtures/can_flush_error_by_item.xml b/Tests/Integration/Domain/Index/Queue/Fixtures/can_flush_error_by_item.xml
deleted file mode 100644
index 2be2f7cd6f..0000000000
--- a/Tests/Integration/Domain/Index/Queue/Fixtures/can_flush_error_by_item.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
-
- 1
- 1
-
-
-
- 2
- 1
-
-
-
- 4711
- 1
- pages
- 1489507500
-
-
-
-
- 4712
- 1
- pages
- 0
- something very bad happenend on site 1
-
-
-
- 4713
- 2
- pages
- 1489507800
- something bad happpend on site 2
-
-
-
- 4714
- 1
- pages
- 1489507800
- another error in site 1
-
-
\ No newline at end of file
diff --git a/Tests/Integration/Domain/Index/Queue/Fixtures/can_keep_indexing_properties.csv b/Tests/Integration/Domain/Index/Queue/Fixtures/can_keep_indexing_properties.csv
new file mode 100644
index 0000000000..f472a76945
--- /dev/null
+++ b/Tests/Integration/Domain/Index/Queue/Fixtures/can_keep_indexing_properties.csv
@@ -0,0 +1,51 @@
+"pages",
+,"uid","pid","is_siteroot","doktype","slug","title","subtitle","crdate","tstamp"
+,4711,1,0,1,"/hello-subpage","hello subpage","the subtitle",1449151778,1449151778
+"sys_template",
+,"uid","pid","root","clear","sorting","config"
+,2,1,1,3,100,"
+page = PAGE
+page.typeNum = 0
+
+plugin.tx_solr {
+ enabled = 1
+
+ index {
+ fieldProcessingInstructions {
+ changed = timestampToIsoDate
+ created = timestampToIsoDate
+ endtime = timestampToUtcIsoDate
+ rootline = pageUidToHierarchy
+ }
+
+ queue {
+
+ // mapping tableName.fields.SolrFieldName => TableFieldName (+ cObj processing)
+
+ pages = 1
+ pages {
+ initialization = ApacheSolrForTypo3\Solr\IndexQueue\Initializer\Page
+
+ // allowed page types (doktype) when indexing pages
+ allowedPageTypes = 1,7
+
+ indexingPriority = 0
+
+ indexer = ApacheSolrForTypo3\Solr\IndexQueue\PageIndexer
+ indexer {
+ // add options for the indexer here
+ }
+
+ // Only index standard pages and mount points that are not overlayed.
+ additionalWhereClause = (doktype = 1 OR (doktype=7 AND mount_pid_ol=0)) AND no_search = 0
+
+ fields {
+ sortSubTitle_stringS = subtitle
+ custom_stringS = TEXT
+ custom_stringS.value = my text
+ }
+ }
+
+ }
+ }
+}
diff --git a/Tests/Integration/Domain/Index/Queue/Fixtures/can_keep_indexing_properties.xml b/Tests/Integration/Domain/Index/Queue/Fixtures/can_keep_indexing_properties.xml
deleted file mode 100644
index 77f2873b8d..0000000000
--- a/Tests/Integration/Domain/Index/Queue/Fixtures/can_keep_indexing_properties.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
-
-
- 1
- 1
- 1
- 3
-
-
-
- plugin.tx_solr {
-
- enabled = 1
-
-
- index {
- fieldProcessingInstructions {
- changed = timestampToIsoDate
- created = timestampToIsoDate
- endtime = timestampToUtcIsoDate
- rootline = pageUidToHierarchy
- }
-
- queue {
-
- // mapping tableName.fields.SolrFieldName => TableFieldName (+ cObj processing)
-
- pages = 1
- pages {
- initialization = ApacheSolrForTypo3\Solr\IndexQueue\Initializer\Page
-
- // allowed page types (doktype) when indexing records from table "pages"
- allowedPageTypes = 1,7
-
- indexingPriority = 0
-
- indexer = ApacheSolrForTypo3\Solr\IndexQueue\PageIndexer
- indexer {
- // add options for the indexer here
- }
-
- // Only index standard pages and mount points that are not overlayed.
- additionalWhereClause = (doktype = 1 OR (doktype=7 AND mount_pid_ol=0)) AND no_search = 0
-
- fields {
- sortSubTitle_stringS = subtitle
- custom_stringS = TEXT
- custom_stringS.value = my text
- }
- }
-
- }
- }
- }
- ]]>
-
- 100
-
-
- 1
- 0
- 1
- 1
- hello solr
- the subtitle
- 1449151778
- 1449151778
-
-
-
- 4711
- 1
- 0
- 1
- hello subpage
- the subtitle
- 1449151778
- 1449151778
-
-
-
\ No newline at end of file
diff --git a/Tests/Integration/Domain/Index/Queue/Fixtures/pages_and_news_queueitems.csv b/Tests/Integration/Domain/Index/Queue/Fixtures/pages_and_news_queueitems.csv
new file mode 100644
index 0000000000..7cadb67992
--- /dev/null
+++ b/Tests/Integration/Domain/Index/Queue/Fixtures/pages_and_news_queueitems.csv
@@ -0,0 +1,9 @@
+"tx_solr_indexqueue_item",
+,"uid","root","item_type","item_uid","indexing_configuration","has_indexing_properties","indexing_priority","errors","pages_mountidentifier","changed","indexed"
+,4711,1,"pages",1,"pages",0,0,,,1449151778,0
+,4712,2,"pages",2,"pages",0,0,,,1449151778,0
+,4713,3,"pages",1,"pages",0,0,,,1449151778,0
+# News Records that should stay untouched
+,4714,1,"tx_news_domain_model_news",1,"news",0,0,,,1449151778,0
+,4715,2,"tx_news_domain_model_news",1,"news",0,0,,,1449151778,0
+,4716,3,"tx_news_domain_model_news",1,"news",0,0,,,1449151778,0
diff --git a/Tests/Integration/Domain/Index/Queue/Fixtures/update_has_indexing_properties_flag.csv b/Tests/Integration/Domain/Index/Queue/Fixtures/update_has_indexing_properties_flag.csv
new file mode 100644
index 0000000000..9a5cdf7a39
--- /dev/null
+++ b/Tests/Integration/Domain/Index/Queue/Fixtures/update_has_indexing_properties_flag.csv
@@ -0,0 +1,47 @@
+"tx_solr_indexqueue_item",
+,"uid","root","item_type","item_uid","indexing_configuration","has_indexing_properties","indexing_priority","errors","pages_mountidentifier","changed","indexed"
+,4711,1,"pages",1,"pages",0,0,,,1449151778,0
+"sys_template",
+,"uid","pid","root","clear","sorting","config"
+,2,1,1,3,100,"
+page = PAGE
+page.typeNum = 0
+
+plugin.tx_solr {
+ enabled = 1
+
+ index {
+ fieldProcessingInstructions {
+ changed = timestampToIsoDate
+ created = timestampToIsoDate
+ endtime = timestampToUtcIsoDate
+ rootline = pageUidToHierarchy
+ }
+ queue {
+ // mapping tableName.fields.SolrFieldName => TableFieldName (+ cObj processing)
+ pages = 1
+ pages {
+ initialization = ApacheSolrForTypo3\Solr\IndexQueue\Initializer\Page
+
+ // allowed page types (doktype) when indexing pages
+ allowedPageTypes = 1,7
+
+ indexingPriority = 0
+
+ indexer = ApacheSolrForTypo3\Solr\IndexQueue\PageIndexer
+ indexer {
+ // add options for the indexer here
+ }
+
+ // Only index standard pages and mount points that are not overlayed.
+ additionalWhereClause = (doktype = 1 OR (doktype=7 AND mount_pid_ol=0)) AND no_search = 0
+
+ fields {
+ sortSubTitle_stringS = subtitle
+ custom_stringS = TEXT
+ custom_stringS.value = my text
+ }
+ }
+ }
+ }
+}"
diff --git a/Tests/Integration/Domain/Index/Queue/Fixtures/update_has_indexing_properties_flag.xml b/Tests/Integration/Domain/Index/Queue/Fixtures/update_has_indexing_properties_flag.xml
deleted file mode 100644
index 465ab84828..0000000000
--- a/Tests/Integration/Domain/Index/Queue/Fixtures/update_has_indexing_properties_flag.xml
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-
-
-
-
- 1
- 1
- 1
- 3
-
-
-
- plugin.tx_solr {
-
- enabled = 1
-
-
- index {
- fieldProcessingInstructions {
- changed = timestampToIsoDate
- created = timestampToIsoDate
- endtime = timestampToUtcIsoDate
- rootline = pageUidToHierarchy
- }
-
- queue {
-
- // mapping tableName.fields.SolrFieldName => TableFieldName (+ cObj processing)
-
- pages = 1
- pages {
- initialization = ApacheSolrForTypo3\Solr\IndexQueue\Initializer\Page
-
- // allowed page types (doktype) when indexing records from table "pages"
- allowedPageTypes = 1,7
-
- indexingPriority = 0
-
- indexer = ApacheSolrForTypo3\Solr\IndexQueue\PageIndexer
- indexer {
- // add options for the indexer here
- }
-
- // Only index standard pages and mount points that are not overlayed.
- additionalWhereClause = (doktype = 1 OR (doktype=7 AND mount_pid_ol=0)) AND no_search = 0
-
- fields {
- sortSubTitle_stringS = subtitle
- custom_stringS = TEXT
- custom_stringS.value = my text
- }
- }
-
- }
- }
- }
- ]]>
-
- 100
-
-
- 1
- 0
- 1
- 1
- hello solr
- the subtitle
- 1449151778
- 1449151778
-
-
- 4711
- 1
- pages
- 1
- pages
- 0
- 0
- 1449151778
- 0
-
-
-
-
-
\ No newline at end of file
diff --git a/Tests/Integration/Domain/Index/Queue/QueueItemRepositoryTest.php b/Tests/Integration/Domain/Index/Queue/QueueItemRepositoryTest.php
index 2551c07d1b..6da3255530 100644
--- a/Tests/Integration/Domain/Index/Queue/QueueItemRepositoryTest.php
+++ b/Tests/Integration/Domain/Index/Queue/QueueItemRepositoryTest.php
@@ -28,12 +28,6 @@
*/
class QueueItemRepositoryTest extends IntegrationTest
{
- /**
- * @inheritdoc
- * @todo: Remove unnecessary fixtures and remove that property as intended.
- */
- protected bool $skipImportRootPagesAndTemplatesForConfiguredSites = true;
-
protected function setUp(): void
{
parent::setUp();
@@ -45,7 +39,7 @@ protected function setUp(): void
*/
public function canUpdateHasIndexingPropertiesFlagByItemUid()
{
- $this->importDataSetFromFixture('update_has_indexing_properties_flag.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/update_has_indexing_properties_flag.csv');
$queueItemRepository = GeneralUtility::makeInstance(QueueItemRepository::class);
@@ -68,13 +62,13 @@ public function canUpdateHasIndexingPropertiesFlagByItemUid()
*/
public function deleteItemDeletesItemForEverySite()
{
- $this->importDataSetFromFixture('can_delete_item_by_type_and_uid.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/pages_and_news_queueitems.csv');
/* @var QueueItemRepository $queueItemRepository */
$queueItemRepository = GeneralUtility::makeInstance(QueueItemRepository::class);
self::assertSame(6, $queueItemRepository->count(), 'Unexpected amount of items in the index queue');
$queueItemRepository->deleteItem('pages', 1);
- self::assertSame(3, $queueItemRepository->count(), 'Unexpected amount of items in the index queue after deletion by type and uid');
+ self::assertSame(4, $queueItemRepository->count(), 'Unexpected amount of items in the index queue after deletion by type and uid');
}
/**
@@ -82,13 +76,13 @@ public function deleteItemDeletesItemForEverySite()
*/
public function canDeleteItemByPassingTypeOnly()
{
- $this->importDataSetFromFixture('can_delete_item_by_type.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/pages_and_news_queueitems.csv');
/* @var QueueItemRepository $queueItemRepository */
$queueItemRepository = GeneralUtility::makeInstance(QueueItemRepository::class);
self::assertSame(6, $queueItemRepository->count(), 'Unexpected amount of items in the index queue');
$queueItemRepository->deleteItem('pages');
- self::assertSame(2, $queueItemRepository->count(), 'Unexpected amount of items in the index queue after deletion by type and uid');
+ self::assertSame(3, $queueItemRepository->count(), 'Unexpected amount of items in the index queue after deletion by type');
}
/**
@@ -96,12 +90,12 @@ public function canDeleteItemByPassingTypeOnly()
*/
public function canCountItems()
{
- $this->importDataSetFromFixture('can_count_items.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/pages_and_news_queueitems.csv');
/* @var QueueItemRepository $queueItemRepository */
$queueItemRepository = GeneralUtility::makeInstance(QueueItemRepository::class);
self::assertSame(6, $queueItemRepository->countItems(), 'Unexpected amount of items counted when no filter was passed');
- self::assertSame(4, $queueItemRepository->countItems([], ['pages']), 'Unexpected amount of counted pages');
- self::assertSame(2, $queueItemRepository->countItems([], ['pages'], [], [3, 4]), 'Unexpected amount of counted pages and item uids');
+ self::assertSame(3, $queueItemRepository->countItems([], ['pages']), 'Unexpected amount of counted pages');
+ self::assertSame(3, $queueItemRepository->countItems([], ['pages'], [], [1, 2]), 'Unexpected amount of counted pages and item uids');
self::assertSame(1, $queueItemRepository->countItems([], ['pages'], [], [], [4713]), 'Unexpected amount of counted pages and uids');
}
@@ -110,14 +104,14 @@ public function canCountItems()
*/
public function canFindItems()
{
- $this->importDataSetFromFixture('can_find_items.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/pages_and_news_queueitems.csv');
/* @var QueueItemRepository $queueItemRepository */
$queueItemRepository = GeneralUtility::makeInstance(QueueItemRepository::class);
$items = $queueItemRepository->findItems([], ['pages']);
/** @var Item $firstItem */
$firstItem = $items[0];
- self::assertSame(4, count($items));
+ self::assertSame(2, count($items));
self::assertSame('pages', $firstItem->getType(), 'First item has unexpected type');
}
@@ -126,7 +120,7 @@ public function canFindItems()
*/
public function indexingPropertyIsKeptWhenItIsReferencedToAnotherQueueItem()
{
- $this->importDataSetFromFixture('can_keep_indexing_properties.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/can_keep_indexing_properties.csv');
/** @var SiteRepository $siteRepository */
$siteRepository = GeneralUtility::makeInstance(SiteRepository::class);
@@ -168,7 +162,7 @@ public function indexingPropertyIsKeptWhenItIsReferencedToAnotherQueueItem()
*/
public function canFlushErrorByItem()
{
- $this->importDataSetFromFixture('can_flush_error_by_item.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/can_flush_error_by_item.csv');
/* @var QueueItemRepository $queueItemRepository */
$queueItemRepository = GeneralUtility::makeInstance(QueueItemRepository::class);
diff --git a/Tests/Integration/Domain/Search/ApacheSolrDocument/ApacheSolrDocumentRepositoryTest.php b/Tests/Integration/Domain/Search/ApacheSolrDocument/ApacheSolrDocumentRepositoryTest.php
index b1c49e542b..9c9d78c7ab 100644
--- a/Tests/Integration/Domain/Search/ApacheSolrDocument/ApacheSolrDocumentRepositoryTest.php
+++ b/Tests/Integration/Domain/Search/ApacheSolrDocument/ApacheSolrDocumentRepositoryTest.php
@@ -30,12 +30,6 @@
class ApacheSolrDocumentRepositoryTest extends IntegrationTest
{
- /**
- * @inheritdoc
- * @todo: Remove unnecessary fixtures and remove that property as intended.
- */
- protected bool $skipImportRootPagesAndTemplatesForConfiguredSites = true;
-
/**
* @var Repository|null
*/
@@ -58,8 +52,9 @@ protected function setUp(): void
$this->writeDefaultSolrTestSiteConfiguration();
$_SERVER['HTTP_HOST'] = 'testone.site';
$_SERVER['REQUEST_URI'] = '/search.html';
- // trigger a search
- $this->indexPageIdsFromFixture('can_get_apacheSolrDocuments.xml', [1, 2, 3, 4, 5]);
+ // trigger an index
+ $this->importCSVDataSet(__DIR__ . '/../../../Controller/Fixtures/indexing_data.csv');
+ $this->indexPageIds([1, 2, 3, 4, 5]);
$this->waitToBeVisibleInSolr();
diff --git a/Tests/Integration/Domain/Search/ApacheSolrDocument/Fixtures/can_get_apacheSolrDocuments.xml b/Tests/Integration/Domain/Search/ApacheSolrDocument/Fixtures/can_get_apacheSolrDocuments.xml
deleted file mode 100644
index 6b0849ed25..0000000000
--- a/Tests/Integration/Domain/Search/ApacheSolrDocument/Fixtures/can_get_apacheSolrDocuments.xml
+++ /dev/null
@@ -1,274 +0,0 @@
-
-
-
-
-
- 1
- 1
- 1
- 3
-
-
-
- # very simple rendering
- page.10 = CONTENT
- page.10 {
- table = tt_content
- select.orderBy = sorting
- select.where = colPos=0
- renderObj = COA
- renderObj {
- 10 = TEXT
- 10.field = bodytext
- }
- }
-
- page.10.wrap = |
-
- plugin.tx_solr_PiResults_Results = USER_INT
- plugin.tx_solr_PiResults_Results.userFunc = ApacheSolrForTypo3\Solr\Plugin\Results\Results->main
- tt_content.list.20.solr_pi_results =< plugin.tx_solr_PiResults_Results
-
- plugin.tx_solr_PiSearch_Search = USER
- plugin.tx_solr_PiSearch_Search.userFunc = ApacheSolrForTypo3\Solr\Plugin\Search\Search->main
- tt_content.list.20.solr_pi_search =< plugin.tx_solr_PiSearch_Search
-
- plugin.tx_solr_PiFrequentSearches_FrequentSearches = USER
- plugin.tx_solr_PiFrequentSearches_FrequentSearches.userFunc = ApacheSolrForTypo3\Solr\Plugin\FrequentSearches\FrequentSearches->main
- tt_content.list.20.solr_pi_frequentsearches =< plugin.tx_solr_PiFrequentSearches_FrequentSearches
-
-
- plugin.tx_solr {
-
- enabled = 1
-
- enableDebugMode = 0
-
- general {
- dateFormat.date = d.m.Y H:i
- baseWrap {
- value = |
- }
- }
-
- index {
- additionalFields {
-
- }
-
- // assigns processing instructions to Solr fields during indexing, Solr field = processing instruction
- fieldProcessingInstructions {
- changed = timestampToIsoDate
- created = timestampToIsoDate
- endtime = timestampToUtcIsoDate
- rootline = pageUidToHierarchy
- pageHierarchy_stringM = pathToHierarchy
- }
-
- queue {
-
- // mapping tableName.fields.SolrFieldName => TableFieldName (+ cObj processing)
-
- pages = 1
- pages {
- initialization = ApacheSolrForTypo3\Solr\IndexQueue\Initializer\Page
-
- // allowed page types (doktype) when indexing records from table "pages"
- allowedPageTypes = 1,7,4
-
- indexingPriority = 0
-
- indexer = ApacheSolrForTypo3\Solr\IndexQueue\PageIndexer
- indexer {
- // add options for the indexer here
- }
-
- // Only index standard pages and mount points that are not overlayed.
- additionalWhereClause = (doktype = 1 OR doktype=4 OR (doktype=7 AND mount_pid_ol=0)) AND no_search = 0
-
- //exclude some html parts inside TYPO3SEARCH markers by classname (comma list)
- excludeContentByClass = typo3-search-exclude
-
- fields {
- sortSubTitle_stringS = subtitle
- }
- }
-
- }
- }
-
- search {
- // fields that are allowed to contain html and should be skipped during escaping after retrieval from Solr
- // by default all fields expect url get escaped, you might need to add other url fields here as well because of &
- // characters in the url.
- trustedFields = url
-
- targetPage = {$plugin.tx_solr.search.targetPage}
-
- initializeWithEmptyQuery = 0
- showResultsOfInitialEmptyQuery = 0
-
- initializeWithQuery =
- showResultsOfInitialQuery = 0
-
- keepExistingParametersForNewSearches = 1
-
- query {
- allowEmptyQuery = 1
-
- allowedSites = __solr_current_site
-
- // qf parameter http://wiki.apache.org/solr/DisMaxQParserPlugin#qf_.28Query_Fields.29
- queryFields = content^40.0, title^5.0, keywords^2.0, tagsH1^5.0, tagsH2H3^3.0, tagsH4H5H6^2.0, tagsInline^1.0, description^4.0, abstract^1.0, subtitle^1.0, navtitle^1.0, author^1.0
-
- // fl parameter http://wiki.apache.org/solr/CommonQueryParameters#fl
- returnFields = *, score
-
- // see http://wiki.apache.org/solr/DisMaxRequestHandler#mm_.28Minimum_.27Should.27_Match.29
- minimumMatch =
-
- // see http://wiki.apache.org/solr/DisMaxRequestHandler#bf_.28Boost_Functions.29
- boostFunction =
-
- // see http://wiki.apache.org/solr/DisMaxQParserPlugin#bq_.28Boost_Query.29
- boostQuery =
-
- filter {
-
- }
-
- sortBy =
- }
-
- results {
- resultsHighlighting = 1
- resultsHighlighting {
- highlightFields = content, title
- fragmentSize = 200
- fragmentSeparator = [...]
-
- wrap = |
- }
- siteHighlighting = 0
-
- resultsPerPage = 5
- resultsPerPageSwitchOptions = 5, 10, 25, 50
-
- pagebrowser {
- enabled = 1
-
- pagesBefore = 3
- pagesAfter = 3
-
- enableMorePages = 1
- enableLessPages = 1
- }
-
- showDocumentScoreAnalysis = 0
- }
- }
- }
- ]]>
-
- 100
- 0
-
-
- 1
- 1
- 1
- Products
-
-
- 2
- 1
- 0
- 1
- Woman Products
-
-
- 3
- 1
- 0
- 1
- Men Products
-
-
- 4
- 3
- 0
- 1
- Men Socks
-
-
- 5
- 3
- 0
- 1
- Men Jeans
-
-
- 6
- 2
- 0
- 1
- Woman Shoes
-
-
- 7
- 2
- 0
- 1
- Woman T-Shirts
-
-
- 8
- 3
- 0
- 1
- Men T-Shirts
-
-
- 9
- 3
- 0
- 1
- Men Sweatshirts
-
-
- 10
- 2
- 0
- 1
- Woman Sweatshirts
-
-
-
- 1
- 4
- text
- Our awesome new sock products prices starting at 10€
- 0
-
-
-
- 2
- 5
- text
- Our awesome men jeans products prices starting at 50€
- 0
-
-
-
- 3
- 5
- text
- Men jeans with best prices
- 0
-
-
\ No newline at end of file
diff --git a/Tests/Integration/Domain/Search/LastSearches/Fixtures/can_find_and_add_last_searches.xml b/Tests/Integration/Domain/Search/LastSearches/Fixtures/can_find_and_add_last_searches.xml
deleted file mode 100644
index fdb7c58b0b..0000000000
--- a/Tests/Integration/Domain/Search/LastSearches/Fixtures/can_find_and_add_last_searches.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
- 0
- 1502721178
- 0
-
-
-
- 1
- 1502721184
- 1
-
-
-
- 2
- 1502721199
- 2
-
-
-
- 3
- 1502721206
- 3
-
-
-
- 4
- 1502721213
- 4
-
-
\ No newline at end of file
diff --git a/Tests/Integration/Domain/Search/LastSearches/Fixtures/last_searches.csv b/Tests/Integration/Domain/Search/LastSearches/Fixtures/last_searches.csv
new file mode 100644
index 0000000000..ab2ad43697
--- /dev/null
+++ b/Tests/Integration/Domain/Search/LastSearches/Fixtures/last_searches.csv
@@ -0,0 +1,7 @@
+"tx_solr_last_searches",
+,"sequence_id","tstamp","keywords"
+,0,1502721178,0
+,1,1502721184,1
+,2,1502721199,2
+,3,1502721206,3
+,4,1502721213,4
diff --git a/Tests/Integration/Domain/Search/LastSearches/LastSearchesRepositoryTest.php b/Tests/Integration/Domain/Search/LastSearches/LastSearchesRepositoryTest.php
index fc6fcd2ad7..b20ba02672 100644
--- a/Tests/Integration/Domain/Search/LastSearches/LastSearchesRepositoryTest.php
+++ b/Tests/Integration/Domain/Search/LastSearches/LastSearchesRepositoryTest.php
@@ -30,6 +30,7 @@ protected function setUp(): void
{
parent::setUp();
$this->lastSearchesRepository = GeneralUtility::makeInstance(LastSearchesRepository::class);
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/last_searches.csv');
}
/**
@@ -37,7 +38,6 @@ protected function setUp(): void
*/
public function canFindAllKeywords()
{
- $this->importDataSetFromFixture('can_find_and_add_last_searches.xml');
$actual = $this->lastSearchesRepository->findAllKeywords(10);
self::assertSame(['4', '3', '2', '1', '0'], $actual);
}
@@ -47,8 +47,6 @@ public function canFindAllKeywords()
*/
public function addWillInsertNewRowIfLastSearchesLimitIsNotExceeded()
{
- $this->importDataSetFromFixture('can_find_and_add_last_searches.xml');
-
$this->lastSearchesRepository->add('5', 6);
$actual = $this->lastSearchesRepository->findAllKeywords(10);
@@ -60,8 +58,6 @@ public function addWillInsertNewRowIfLastSearchesLimitIsNotExceeded()
*/
public function addWillUpdateOldestRowIfLastSearchesLimitIsExceeded()
{
- $this->importDataSetFromFixture('can_find_and_add_last_searches.xml');
-
$this->lastSearchesRepository->add('5', 5);
$actual = $this->lastSearchesRepository->findAllKeywords();
@@ -73,8 +69,6 @@ public function addWillUpdateOldestRowIfLastSearchesLimitIsExceeded()
*/
public function lastUpdatedRowIsOnFirstPosition()
{
- $this->importDataSetFromFixture('can_find_and_add_last_searches.xml');
-
$this->lastSearchesRepository->add('1', 5);
$actual = $this->lastSearchesRepository->findAllKeywords();
diff --git a/Tests/Integration/Domain/Search/ResultSet/Fixtures/can_get_searchResultSet.csv b/Tests/Integration/Domain/Search/ResultSet/Fixtures/can_get_searchResultSet.csv
new file mode 100644
index 0000000000..a3b2075d17
--- /dev/null
+++ b/Tests/Integration/Domain/Search/ResultSet/Fixtures/can_get_searchResultSet.csv
@@ -0,0 +1,26 @@
+"pages",
+,"uid","pid","is_siteroot","doktype","slug","title","author"
+,9,3,0,1,"/men/sweatshirts","Men Sweatshirts","John Doe"
+,10,2,0,1,"/women/sweatshirts","Woman Sweatshirts","John Doe"
+,11,1,0,1,"/children/sweatshirts","Children Sweatshirts","Baby Doe"
+"sys_template",
+,"uid","pid","root","clear","sorting","config"
+,2,1,1,3,50,"
+page = PAGE
+page.typeNum = 0
+
+plugin.tx_solr {
+ enabled = 1
+
+ index {
+ // assigns processing instructions to Solr fields during indexing, Solr field = processing instruction
+ fieldProcessingInstructions {
+ changed = timestampToIsoDate
+ created = timestampToIsoDate
+ endtime = timestampToUtcIsoDate
+ rootline = pageUidToHierarchy
+ pageHierarchy_stringM = pathToHierarchy
+ }
+
+ }
+}"
diff --git a/Tests/Integration/Domain/Search/ResultSet/Fixtures/can_get_searchResultSet.xml b/Tests/Integration/Domain/Search/ResultSet/Fixtures/can_get_searchResultSet.xml
deleted file mode 100644
index f29bec930f..0000000000
--- a/Tests/Integration/Domain/Search/ResultSet/Fixtures/can_get_searchResultSet.xml
+++ /dev/null
@@ -1,292 +0,0 @@
-
-
-
-
- 1
- 1
- 1
- 3
-
-
-
- # very simple rendering
- page.10 = CONTENT
- page.10 {
- table = tt_content
- select.orderBy = sorting
- select.where = colPos=0
- renderObj = COA
- renderObj {
- 10 = TEXT
- 10.field = bodytext
- }
- }
-
- page.10.wrap = |
-
- plugin.tx_solr_PiResults_Results = USER_INT
- plugin.tx_solr_PiResults_Results.userFunc = ApacheSolrForTypo3\Solr\Plugin\Results\Results->main
- tt_content.list.20.solr_pi_results =< plugin.tx_solr_PiResults_Results
-
- plugin.tx_solr_PiSearch_Search = USER
- plugin.tx_solr_PiSearch_Search.userFunc = ApacheSolrForTypo3\Solr\Plugin\Search\Search->main
- tt_content.list.20.solr_pi_search =< plugin.tx_solr_PiSearch_Search
-
- plugin.tx_solr_PiFrequentSearches_FrequentSearches = USER
- plugin.tx_solr_PiFrequentSearches_FrequentSearches.userFunc = ApacheSolrForTypo3\Solr\Plugin\FrequentSearches\FrequentSearches->main
- tt_content.list.20.solr_pi_frequentsearches =< plugin.tx_solr_PiFrequentSearches_FrequentSearches
-
-
- plugin.tx_solr {
-
- enabled = 1
-
- enableDebugMode = 0
-
- general {
- dateFormat.date = d.m.Y H:i
- baseWrap {
- value = |
- }
- }
-
- index {
- additionalFields {
-
- }
-
- // assigns processing instructions to Solr fields during indexing, Solr field = processing instruction
- fieldProcessingInstructions {
- changed = timestampToIsoDate
- created = timestampToIsoDate
- endtime = timestampToUtcIsoDate
- rootline = pageUidToHierarchy
- pageHierarchy_stringM = pathToHierarchy
- }
-
- queue {
-
- // mapping tableName.fields.SolrFieldName => TableFieldName (+ cObj processing)
-
- pages = 1
- pages {
- initialization = ApacheSolrForTypo3\Solr\IndexQueue\Initializer\Page
-
- // allowed page types (doktype) when indexing records from table "pages"
- allowedPageTypes = 1,7,4
-
- indexingPriority = 0
-
- indexer = ApacheSolrForTypo3\Solr\IndexQueue\PageIndexer
- indexer {
- // add options for the indexer here
- }
-
- // Only index standard pages and mount points that are not overlayed.
- additionalWhereClause = (doktype = 1 OR doktype=4 OR (doktype=7 AND mount_pid_ol=0)) AND no_search = 0
-
- //exclude some html parts inside TYPO3SEARCH markers by classname (comma list)
- excludeContentByClass = typo3-search-exclude
-
- fields {
- sortSubTitle_stringS = subtitle
- }
- }
-
- }
- }
-
- search {
- // fields that are allowed to contain html and should be skipped during escaping after retrieval from Solr
- // by default all fields expect url get escaped, you might need to add other url fields here as well because of &
- // characters in the url.
- trustedFields = url
-
- targetPage = {$plugin.tx_solr.search.targetPage}
-
- initializeWithEmptyQuery = 0
- showResultsOfInitialEmptyQuery = 0
-
- initializeWithQuery =
- showResultsOfInitialQuery = 0
-
- keepExistingParametersForNewSearches = 1
-
- query {
- allowEmptyQuery = 1
-
- allowedSites = __solr_current_site
-
- // qf parameter http://wiki.apache.org/solr/DisMaxQParserPlugin#qf_.28Query_Fields.29
- queryFields = content^40.0, title^5.0, keywords^2.0, tagsH1^5.0, tagsH2H3^3.0, tagsH4H5H6^2.0, tagsInline^1.0, description^4.0, abstract^1.0, subtitle^1.0, navtitle^1.0, author^1.0
-
- // fl parameter http://wiki.apache.org/solr/CommonQueryParameters#fl
- returnFields = *, score
-
- // see http://wiki.apache.org/solr/DisMaxRequestHandler#mm_.28Minimum_.27Should.27_Match.29
- minimumMatch =
-
- // see http://wiki.apache.org/solr/DisMaxRequestHandler#bf_.28Boost_Functions.29
- boostFunction =
-
- // see http://wiki.apache.org/solr/DisMaxQParserPlugin#bq_.28Boost_Query.29
- boostQuery =
-
- filter {
-
- }
-
- sortBy =
- }
-
- results {
- resultsHighlighting = 1
- resultsHighlighting {
- highlightFields = content, title
- fragmentSize = 200
- fragmentSeparator = [...]
-
- wrap = |
- }
- siteHighlighting = 0
-
- resultsPerPage = 5
- resultsPerPageSwitchOptions = 5, 10, 25, 50
-
- pagebrowser {
- enabled = 1
-
- pagesBefore = 3
- pagesAfter = 3
-
- enableMorePages = 1
- enableLessPages = 1
- }
-
- showDocumentScoreAnalysis = 0
- }
- }
- }
- ]]>
-
- 100
- 0
-
-
- 1
- 0
- 1
- 1
- Products
- John Doe
-
-
- 2
- 1
- 0
- 1
- Woman Products
- Jane Doe
-
-
- 3
- 1
- 0
- 1
- Men Products
- John Doe
-
-
- 4
- 3
- 0
- 1
- Men Socks
- John Doe
-
-
- 5
- 3
- 0
- 1
- Men Jeans
- John Doe
-
-
- 6
- 2
- 0
- 1
- Woman Shoes
- Jane Doe
-
-
- 7
- 2
- 0
- 1
- Woman T-Shirts
- Jane Doe
-
-
- 8
- 3
- 0
- 1
- Men T-Shirts
- John Doe
-
-
- 9
- 3
- 0
- 1
- Men Sweatshirts
- John Doe
-
-
- 10
- 2
- 0
- 1
- Woman Sweatshirts
- John Doe
-
-
- 11
- 1
- 0
- 1
- Children Sweatshirts
- Baby Doe
-
-
-
- 1
- 4
- text
- Our awesome new sock products prices starting at 10€
- 0
-
-
-
- 2
- 5
- text
- Our awesome men jeans products prices starting at 50€
- 0
-
-
-
- 3
- 5
- text
- Men jeans with best prices
- 0
-
-
\ No newline at end of file
diff --git a/Tests/Integration/Domain/Search/ResultSet/Fixtures/fe_user_page.csv b/Tests/Integration/Domain/Search/ResultSet/Fixtures/fe_user_page.csv
new file mode 100644
index 0000000000..1b93fb1f47
--- /dev/null
+++ b/Tests/Integration/Domain/Search/ResultSet/Fixtures/fe_user_page.csv
@@ -0,0 +1,14 @@
+"pages",
+,"uid","pid","is_siteroot","doktype","slug","title","fe_group","module"
+,2,1,0,1,"/public","Public page",0,""
+,3,1,0,1,"/restricted","Private page",1,""
+,4,1,0,254,"/folder","FE Users",0,"fe_users"
+"tt_content",
+,"uid","pid","colPos","CType","bodytext"
+,1,3,0,"text","Top secret content"
+"fe_groups",
+,"uid","pid","title"
+,1,4,"Secret"
+"fe_users",
+,"uid","pid","username","usergroup"
+,1,4,"test",1
diff --git a/Tests/Integration/Domain/Search/ResultSet/Fixtures/fe_user_page.xml b/Tests/Integration/Domain/Search/ResultSet/Fixtures/fe_user_page.xml
deleted file mode 100644
index dec39dac1c..0000000000
--- a/Tests/Integration/Domain/Search/ResultSet/Fixtures/fe_user_page.xml
+++ /dev/null
@@ -1,239 +0,0 @@
-
-
-
-
-
- 1
- 1
- 1
- 3
-
-
-
- # very simple rendering
- page.10 = CONTENT
- page.10 {
- table = tt_content
- select.orderBy = sorting
- select.where = colPos=0
- renderObj = COA
- renderObj {
- 10 = TEXT
- 10.field = bodytext
- }
- }
-
- page.10.wrap = |
-
- plugin.tx_solr_PiResults_Results = USER_INT
- plugin.tx_solr_PiResults_Results.userFunc = ApacheSolrForTypo3\Solr\Plugin\Results\Results->main
- tt_content.list.20.solr_pi_results =< plugin.tx_solr_PiResults_Results
-
- plugin.tx_solr_PiSearch_Search = USER
- plugin.tx_solr_PiSearch_Search.userFunc = ApacheSolrForTypo3\Solr\Plugin\Search\Search->main
- tt_content.list.20.solr_pi_search =< plugin.tx_solr_PiSearch_Search
-
- plugin.tx_solr_PiFrequentSearches_FrequentSearches = USER
- plugin.tx_solr_PiFrequentSearches_FrequentSearches.userFunc = ApacheSolrForTypo3\Solr\Plugin\FrequentSearches\FrequentSearches->main
- tt_content.list.20.solr_pi_frequentsearches =< plugin.tx_solr_PiFrequentSearches_FrequentSearches
-
-
- plugin.tx_solr {
-
- enabled = 1
-
- enableDebugMode = 0
-
- general {
- dateFormat.date = d.m.Y H:i
- baseWrap {
- value = |
- }
- }
-
- index {
- additionalFields {
-
- }
-
- // assigns processing instructions to Solr fields during indexing, Solr field = processing instruction
- fieldProcessingInstructions {
- changed = timestampToIsoDate
- created = timestampToIsoDate
- endtime = timestampToUtcIsoDate
- rootline = pageUidToHierarchy
- pageHierarchy_stringM = pathToHierarchy
- }
-
- queue {
-
- // mapping tableName.fields.SolrFieldName => TableFieldName (+ cObj processing)
-
- pages = 1
- pages {
- initialization = ApacheSolrForTypo3\Solr\IndexQueue\Initializer\Page
-
- // allowed page types (doktype) when indexing records from table "pages"
- allowedPageTypes = 1,7,4
-
- indexingPriority = 0
-
- indexer = ApacheSolrForTypo3\Solr\IndexQueue\PageIndexer
- indexer {
- // add options for the indexer here
- }
-
- // Only index standard pages and mount points that are not overlayed.
- additionalWhereClause = (doktype = 1 OR doktype=4 OR (doktype=7 AND mount_pid_ol=0)) AND no_search = 0
-
- //exclude some html parts inside TYPO3SEARCH markers by classname (comma list)
- excludeContentByClass = typo3-search-exclude
-
- fields {
- sortSubTitle_stringS = subtitle
- }
- }
-
- }
- }
-
- search {
- // fields that are allowed to contain html and should be skipped during escaping after retrieval from Solr
- // by default all fields expect url get escaped, you might need to add other url fields here as well because of &
- // characters in the url.
- trustedFields = url
-
- targetPage = {$plugin.tx_solr.search.targetPage}
-
- initializeWithEmptyQuery = 0
- showResultsOfInitialEmptyQuery = 0
-
- initializeWithQuery =
- showResultsOfInitialQuery = 0
-
- keepExistingParametersForNewSearches = 1
-
- query {
- allowEmptyQuery = 1
-
- allowedSites = __solr_current_site
-
- // qf parameter http://wiki.apache.org/solr/DisMaxQParserPlugin#qf_.28Query_Fields.29
- queryFields = content^40.0, title^5.0, keywords^2.0, tagsH1^5.0, tagsH2H3^3.0, tagsH4H5H6^2.0, tagsInline^1.0, description^4.0, abstract^1.0, subtitle^1.0, navtitle^1.0, author^1.0
-
- // fl parameter http://wiki.apache.org/solr/CommonQueryParameters#fl
- returnFields = *, score
-
- // see http://wiki.apache.org/solr/DisMaxRequestHandler#mm_.28Minimum_.27Should.27_Match.29
- minimumMatch =
-
- // see http://wiki.apache.org/solr/DisMaxRequestHandler#bf_.28Boost_Functions.29
- boostFunction =
-
- // see http://wiki.apache.org/solr/DisMaxQParserPlugin#bq_.28Boost_Query.29
- boostQuery =
-
- filter {
-
- }
-
- sortBy =
- }
-
- results {
- resultsHighlighting = 1
- resultsHighlighting {
- highlightFields = content, title
- fragmentSize = 200
- fragmentSeparator = [...]
-
- wrap = |
- }
- siteHighlighting = 0
-
- resultsPerPage = 5
- resultsPerPageSwitchOptions = 5, 10, 25, 50
-
- pagebrowser {
- enabled = 1
-
- pagesBefore = 3
- pagesAfter = 3
-
- enableMorePages = 1
- enableLessPages = 1
- }
-
- // fieldname => processing instruction, available instructions: timestamp, skip (removes the field from the result)
- fieldProcessingInstructions {
- changed = timestamp
- created = timestamp
- indexed = timestamp
- # TODO rename the skip instruction to remove?!
- spell = skip
- }
-
- showDocumentScoreAnalysis = 0
- }
- }
- }
- ]]>
-
- 100
- 0
-
-
- 1
- 1
- 1
- Products
-
-
- 2
- 1
- 0
- 1
- Public page
-
-
- 3
- 1
- 0
- 1
- Private page
- 1
-
-
- 4
- 1
- 0
- 254
- FE Users
- fe_users
-
-
-
- 1
- 3
- text
- Top secret content
- 0
-
-
-
- 1
- 4
- Secret
-
-
- 1
- 4
- test
- 1
-
-
\ No newline at end of file
diff --git a/Tests/Integration/Domain/Search/ResultSet/Fixtures/simple_site.xml b/Tests/Integration/Domain/Search/ResultSet/Fixtures/simple_site.xml
deleted file mode 100644
index d5f116160e..0000000000
--- a/Tests/Integration/Domain/Search/ResultSet/Fixtures/simple_site.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
- 1
- 1
- 1
- 3
-
-
-
- # very simple rendering
- page.10 = CONTENT
- page.10 {
- table = tt_content
- select.orderBy = sorting
- select.where = colPos=0
- renderObj = COA
- renderObj {
- 10 = TEXT
- 10.field = bodytext
- }
- }
- ]]>
-
- 100
- 0
-
-
- 1
- 1
-
-
-
\ No newline at end of file
diff --git a/Tests/Integration/Domain/Search/ResultSet/ResultSetReconstitutionProcessorTest.php b/Tests/Integration/Domain/Search/ResultSet/ResultSetReconstitutionProcessorTest.php
index 76c6131895..5157906b12 100644
--- a/Tests/Integration/Domain/Search/ResultSet/ResultSetReconstitutionProcessorTest.php
+++ b/Tests/Integration/Domain/Search/ResultSet/ResultSetReconstitutionProcessorTest.php
@@ -30,11 +30,6 @@
use TYPO3\CMS\Core\Exception\SiteNotFoundException;
use TYPO3\TestingFramework\Core\Exception as TestingFrameworkCoreException;
-/**
- * Unit test case for the ObjectReconstitutionProcessor.
- *
- * @author Timo Hund
- */
class ResultSetReconstitutionProcessorTest extends IntegrationTest
{
/**
diff --git a/Tests/Integration/Domain/Search/ResultSet/SearchResultSetServiceTest.php b/Tests/Integration/Domain/Search/ResultSet/SearchResultSetServiceTest.php
index ae5bf8dac3..36b1c41a84 100644
--- a/Tests/Integration/Domain/Search/ResultSet/SearchResultSetServiceTest.php
+++ b/Tests/Integration/Domain/Search/ResultSet/SearchResultSetServiceTest.php
@@ -26,12 +26,6 @@
class SearchResultSetServiceTest extends IntegrationTest
{
- /**
- * @inheritdoc
- * @todo: Remove unnecessary fixtures and remove that property as intended.
- */
- protected bool $skipImportRootPagesAndTemplatesForConfiguredSites = true;
-
protected function setUp(): void
{
parent::setUp();
@@ -53,7 +47,8 @@ protected function tearDown(): void
public function canGetDocumentById()
{
// trigger a search
- $this->indexPageIdsFromFixture('can_get_searchResultSet.xml', [1, 2, 3, 4, 5]);
+ $this->importCSVDataSet(__DIR__ . '/../../../Controller/Fixtures/indexing_data.csv');
+ $this->indexPageIds([1, 2, 3, 4, 5]);
$this->waitToBeVisibleInSolr();
@@ -69,7 +64,7 @@ public function canGetDocumentById()
$searchResultsSetService = GeneralUtility::makeInstance(SearchResultSetService::class, $typoScriptConfiguration, $search);
$document = $searchResultsSetService->getDocumentById('002de2729efa650191f82900ea02a0a3189dfabb/pages/1/0/0/0');
- self::assertSame($document->getTitle(), 'Products', 'Could not get document from solr by id');
+ self::assertSame($document->getTitle(), 'Root of Testpage testone.site aka integration_tree_one', 'Could not get document from solr by id');
}
/**
@@ -77,7 +72,9 @@ public function canGetDocumentById()
*/
public function canGetVariants()
{
- $this->indexPageIdsFromFixture('can_get_searchResultSet.xml', [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
+ $this->importCSVDataSet(__DIR__ . '/../../../Controller/Fixtures/indexing_data.csv');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/can_get_searchResultSet.csv');
+ $this->indexPageIds([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
$this->waitToBeVisibleInSolr();
$solrConnection = GeneralUtility::makeInstance(ConnectionManager::class)->getConnectionByPageId(1, 0, 0);
@@ -105,14 +102,14 @@ public function canGetVariants()
$firstResult = $searchResults[0];
self::assertSame(0, count($firstResult->getVariants()));
- // We assume that the second result (pid=1) has 1 variant.
+ // We assume that the second result (pid=1) has 6 variants.
$secondResult = $searchResults[1];
- self::assertSame(1, count($secondResult->getVariants()));
+ self::assertSame(6, count($secondResult->getVariants()));
- // We assume that the third result (pid=3) has 3 variants.
+ // We assume that the third result (pid=3) has no variants.
$thirdResult = $searchResults[2];
- self::assertSame(3, count($thirdResult->getVariants()));
- self::assertSame('Men Socks', $thirdResult->getTitle());
+ self::assertSame(0, count($thirdResult->getVariants()));
+ self::assertSame('Men Sweatshirts', $thirdResult->getTitle());
// And every variant is indicated to be a variant.
foreach ($thirdResult->getVariants() as $variant) {
@@ -125,7 +122,9 @@ public function canGetVariants()
*/
public function canGetCaseSensitiveVariants()
{
- $this->indexPageIdsFromFixture('can_get_searchResultSet.xml', [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]);
+ $this->importCSVDataSet(__DIR__ . '/../../../Controller/Fixtures/indexing_data.csv');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/can_get_searchResultSet.csv');
+ $this->indexPageIds([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]);
$this->waitToBeVisibleInSolr();
$solrConnection = GeneralUtility::makeInstance(ConnectionManager::class)->getConnectionByPageId(1, 0, 0);
@@ -154,7 +153,7 @@ public function canGetCaseSensitiveVariants()
$searchResults = $this->doSearchWithResultSetService($solrConnection, $typoScriptConfiguration);
self::assertSame(3, count($searchResults), 'There should be three results at all');
- // We assume that the first result has 2 variants.
+ // We assume that the first result has 6 variants.
/* @var SearchResult $firstResult */
$firstResult = $searchResults[0];
self::assertSame(2, count($firstResult->getVariants()));
@@ -195,7 +194,8 @@ public function canGetCaseSensitiveVariants()
*/
public function canGetZeroResultsWithVariantsOnEmptyIndex()
{
- $this->importDataSetFromFixture('can_get_searchResultSet.xml');
+ $this->importCSVDataSet(__DIR__ . '/../../../Controller/Fixtures/indexing_data.csv');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/can_get_searchResultSet.csv');
$this->fakeTsfe(1);
$solrConnection = GeneralUtility::makeInstance(ConnectionManager::class)->getConnectionByPageId(1, 0, 0);
@@ -257,7 +257,8 @@ public function canGetHiddenElementWithPermissions()
*/
protected function importFrontendRestrictedPageScenario()
{
- $this->indexPageIdsFromFixture('fe_user_page.xml', [1, 2, 3], [1]);
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/fe_user_page.csv');
+ $this->indexPageIds([1, 2, 3], [1]);
$this->waitToBeVisibleInSolr();
$solrContent = file_get_contents($this->getSolrConnectionUriAuthority() . '/solr/core_en/select?q=*:*');
self::assertStringContainsString('"numFound":3', $solrContent);
diff --git a/Tests/Integration/FieldProcessor/CategoryUidToHierarchyTest.php b/Tests/Integration/FieldProcessor/CategoryUidToHierarchyTest.php
index fc3bf4bef8..1a5e8fd862 100644
--- a/Tests/Integration/FieldProcessor/CategoryUidToHierarchyTest.php
+++ b/Tests/Integration/FieldProcessor/CategoryUidToHierarchyTest.php
@@ -31,8 +31,7 @@ class CategoryUidToHierarchyTest extends IntegrationTest
*/
public function canConvertToCategoryIdToHierarchy()
{
- $this->importDataSetFromFixture('sys_category.xml');
- /* @var CategoryUidToHierarchy $processor */
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/sys_category.csv');
$processor = GeneralUtility::makeInstance(CategoryUidToHierarchy::class);
$result = $processor->process([2]);
$expectedResult = ['0-1/', '1-1/2/'];
diff --git a/Tests/Integration/FieldProcessor/Fixtures/sys_category.csv b/Tests/Integration/FieldProcessor/Fixtures/sys_category.csv
new file mode 100644
index 0000000000..a622c60345
--- /dev/null
+++ b/Tests/Integration/FieldProcessor/Fixtures/sys_category.csv
@@ -0,0 +1,4 @@
+"sys_category",
+,"uid","pid","parent","title"
+,1,1,0,"root"
+,2,1,1,"child"
diff --git a/Tests/Integration/FieldProcessor/Fixtures/sys_category.xml b/Tests/Integration/FieldProcessor/Fixtures/sys_category.xml
deleted file mode 100644
index 353fc17677..0000000000
--- a/Tests/Integration/FieldProcessor/Fixtures/sys_category.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
- 1
- 1
- 0
- root
-
-
-
- 2
- 1
- 1
- child
-
-
-
\ No newline at end of file
diff --git a/Tests/Integration/Fixtures/Search/can_search.csv b/Tests/Integration/Fixtures/Search/can_search.csv
new file mode 100644
index 0000000000..d1b443e451
--- /dev/null
+++ b/Tests/Integration/Fixtures/Search/can_search.csv
@@ -0,0 +1,50 @@
+"pages",,,,,,
+,"uid","is_siteroot","doktype","title","slug","hidden"
+,1,1,1,"Hello Search Test","/",0
+"sys_template",,,,,,
+,"uid","pid","root","clear","sorting","config",
+,1,1,1,3,100,"
+page = PAGE
+page.typeNum = 0
+
+plugin.tx_solr {
+
+ enabled = 1
+
+ index {
+ fieldProcessingInstructions {
+ changed = timestampToIsoDate
+ created = timestampToIsoDate
+ endtime = timestampToUtcIsoDate
+ rootline = pageUidToHierarchy
+ }
+
+ queue {
+
+ // mapping tableName.fields.SolrFieldName => TableFieldName (+ cObj processing)
+
+ pages = 1
+ pages {
+ initialization = ApacheSolrForTypo3\Solr\IndexQueue\Initializer\Page
+
+ // allowed page types (doktype) when indexing pages
+ allowedPageTypes = 1,7
+
+ indexingPriority = 0
+
+ indexer = ApacheSolrForTypo3\Solr\IndexQueue\PageIndexer
+ indexer {
+ // add options for the indexer here
+ }
+
+ // Only index standard pages and mount points that are not overlayed.
+ additionalWhereClause = (doktype = 1 OR (doktype=7 AND mount_pid_ol=0)) AND no_search = 0
+
+ fields {
+ sortSubTitle_stringS = subtitle
+ }
+ }
+
+ }
+ }
+}"
diff --git a/Tests/Integration/Fixtures/Search/phrase_search.csv b/Tests/Integration/Fixtures/Search/phrase_search.csv
new file mode 100644
index 0000000000..71701b7ce5
--- /dev/null
+++ b/Tests/Integration/Fixtures/Search/phrase_search.csv
@@ -0,0 +1,64 @@
+"pages",,,,,,,
+,"uid","pid","is_siteroot","doktype","hidden","slug","title"
+,1,0,1,1,0,"/","World Hello Search Test"
+,2,1,0,1,0,"/improve","Hello you can improve the precision by using phrase configuration World"
+,3,1,0,1,0,"/hello-phrase-search-world","Hello phrase search World"
+,4,1,0,1,0,"/hello-test-wonderful-world","Hello Test wonderful World"
+,5,1,0,1,0,"/hello-wonderful-test-world","Hello wonderful Test World"
+,6,1,0,1,0,"/bigram-phrases","Bigraming phrases strip down the sentence to the two-word combinations."
+,7,1,0,1,0,"/trigram-phrases","Trigraming phrases strip down the sentence to triplets phrases"
+,8,1,0,1,0,"/difference-to-bi-is-tri","Difference to bi is tri, which means building of triplets phrases."
+,9,1,0,1,0,"/hello-solr-wolrd","Hello Solr Wolrd"
+,10,1,0,1,0,"/hello-test-wolrd","Hello Test Wolrd"
+,11,1,0,1,0,"/test-hello-solr-world","Test Hello Solr World"
+,12,1,0,1,0,"/test-hello-search-world","Test Hello Search World"
+,13,1,0,1,0,"/hello-the-test-search-world","Hello the Test Search World"
+,14,1,0,1,0,"/hello-world-for-phrase-searching","Hello World for phrase searching"
+,15,1,0,1,0,"/about","Solr is blazing-fast and open source enterprise search platform built on Apache Lucene"
+"sys_template",,,,,,,
+,"uid","pid","root","clear","sorting","constants","config",
+,1,1,1,3,100,"","
+page = PAGE
+page.typeNum = 0
+
+plugin.tx_solr {
+ search.query.phrase = 1
+ enabled = 1
+
+ index {
+ fieldProcessingInstructions {
+ changed = timestampToIsoDate
+ created = timestampToIsoDate
+ endtime = timestampToUtcIsoDate
+ rootline = pageUidToHierarchy
+ }
+
+ queue {
+
+ // mapping tableName.fields.SolrFieldName => TableFieldName (+ cObj processing)
+
+ pages = 1
+ pages {
+ initialization = ApacheSolrForTypo3\Solr\IndexQueue\Initializer\Page
+
+ // allowed page types (doktype) when indexing pages
+ allowedPageTypes = 1,7
+
+ indexingPriority = 0
+
+ indexer = ApacheSolrForTypo3\Solr\IndexQueue\PageIndexer
+ indexer {
+ // add options for the indexer here
+ }
+
+ // Only index standard pages and mount points that are not overlayed.
+ additionalWhereClause = (doktype = 1 OR (doktype=7 AND mount_pid_ol=0)) AND no_search = 0
+
+ fields {
+ sortSubTitle_stringS = subtitle
+ }
+ }
+
+ }
+ }
+}",
diff --git a/Tests/Integration/Fixtures/Search/phrase_search_bigram.csv b/Tests/Integration/Fixtures/Search/phrase_search_bigram.csv
new file mode 100644
index 0000000000..e5c3c438c7
--- /dev/null
+++ b/Tests/Integration/Fixtures/Search/phrase_search_bigram.csv
@@ -0,0 +1,68 @@
+"pages",,,,,,,
+,"uid","pid","is_siteroot","doktype","hidden","slug","title"
+# 100% matching
+,1,0,1,1,0,"/","Bigram Phrase Search"
+# bigram phrase slop = 0
+,2,1,0,1,0,"/dump-sentence","This is some dump sentence to match Bigram Phrase"
+,3,1,0,1,0,"/match-phrase-search","This is some dump sentence to match Phrase Search"
+# bigram phrase slop = 1
+,4,1,0,1,0,"/slop-1-bigram-gag-phrase","This is some dump sentence to match slop 1 Bigram gag Phrase"
+,5,1,0,1,0,"/slop-1-phrase-gag-search","This is some dump sentence to match slop 1 Phrase gag Search"
+# bigram phrase slop = 2
+,6,1,0,1,0,"/slop-2-bigram-gag-gag-phrase","This is some dump sentence to match slop 2 Bigram gag gag Phrase"
+,7,1,0,1,0,"/slop-2-phrase-gag-gag-search","This is some dump sentence to match slop 2 Phrase gag gag Search"
+,8,1,0,1,0,"/no-docs-match","This is some dump sentence to match no docs"
+,9,1,0,1,0,"/no-match","This is some dump sentence to match nothing"
+,10,1,0,1,0,"/bphrase-disabled","To disable BPhrase set it to 0."
+,11,1,0,1,0,"/match-phrase-only","This is some dump sentence to match Phrase only"
+,12,1,0,1,0,"/match-search-only","This is some dump sentence to match Search only"
+,13,1,0,1,0,"/match-bigram-only","This is some dump sentence to match Bigram only"
+,14,1,0,1,0,"/implicit-bigram-phrase-pf2","Implicit Bigram gag gag gag gag Phrase gag gag gag gag searches in pf2 fields."
+,15,1,0,1,0,"/bigram-gag-gag-gag-gag-phrase","Bigram gag gag gag gag Phrase gag gag gag gag Search is fascinating feature."
+"sys_template",,,,,,,
+,"uid","pid","root","clear","sorting","constants","config",
+,1,1,1,3,100,"","
+page = PAGE
+page.typeNum = 0
+
+plugin.tx_solr {
+ search.query.bigramPhrase = 1
+ enabled = 1
+
+ index {
+ fieldProcessingInstructions {
+ changed = timestampToIsoDate
+ created = timestampToIsoDate
+ endtime = timestampToUtcIsoDate
+ rootline = pageUidToHierarchy
+ }
+
+ queue {
+
+ // mapping tableName.fields.SolrFieldName => TableFieldName (+ cObj processing)
+
+ pages = 1
+ pages {
+ initialization = ApacheSolrForTypo3\Solr\IndexQueue\Initializer\Page
+
+ // allowed page types (doktype) when indexing pages
+ allowedPageTypes = 1,7
+
+ indexingPriority = 0
+
+ indexer = ApacheSolrForTypo3\Solr\IndexQueue\PageIndexer
+ indexer {
+ // add options for the indexer here
+ }
+
+ // Only index standard pages and mount points that are not overlayed.
+ additionalWhereClause = (doktype = 1 OR (doktype=7 AND mount_pid_ol=0)) AND no_search = 0
+
+ fields {
+ sortSubTitle_stringS = subtitle
+ }
+ }
+
+ }
+ }
+}"
diff --git a/Tests/Integration/Fixtures/Search/phrase_search_trigram.csv b/Tests/Integration/Fixtures/Search/phrase_search_trigram.csv
new file mode 100644
index 0000000000..85049b02fc
--- /dev/null
+++ b/Tests/Integration/Fixtures/Search/phrase_search_trigram.csv
@@ -0,0 +1,67 @@
+"pages",,,,,,,
+,"uid","pid","is_siteroot","doktype","hidden","slug","title"
+# 100% matching
+,1,0,1,1,0,"/","Awesome Trigram Phrase Search"
+# trigram phrase slop = 0
+,2,1,0,1,0,"/dump-sentence","This is some dump sentence to match Awesome Trigram Phrase"
+,3,1,0,1,0,"/match-trigram-phrase-search","This is some dump sentence to match Trigram Phrase Search"
+# trigram phrase slop = 1
+,4,1,0,1,0,"/slop-1-trigram-phrase","This is some dump sentence to match slop 1 Awesome gag Trigram Phrase"
+,5,1,0,1,0,"/slop-1-trigram-phrase-gag-search","This is some dump sentence to match slop 1 Trigram Phrase gag Search"
+# trigram phrase slop = 2
+,6,1,0,1,0,"/slop-2-trigram-gag-gag-phrase","This is some dump sentence to match slop 2 Awesome gag gag Trigram Phrase"
+,7,1,0,1,0,"/slop-2-phrase-gag-gag-search","This is some dump sentence to match slop 2 Trigram Phrase gag gag Search"
+,8,1,0,1,0,"/no-docs-match","This is some dump sentence to match no docs"
+,9,1,0,1,0,"/no-match","This is some dump sentence to match nothing"
+,10,1,0,1,0,"/bphrase-disabled","To disable BPhrase set it to 0."
+,11,1,0,1,0,"/match-phrase-only","This is some dump sentence to match Phrase only"
+,12,1,0,1,0,"/match-search-only","This is some dump sentence to match Search only"
+,13,1,0,1,0,"/match-trigram-only","This is some dump sentence to match Trigram only"
+,14,1,0,1,0,"/match-awesome-only","This is some dump sentence to match Awesome only"
+,15,1,0,1,0,"/trigram-gag-gag-gag-gag-phrase","Trigram gag gag gag gag Phrase gag gag gag gag Search is fascinating feature."
+"sys_template",,,,,,,
+,"uid","pid","root","clear","sorting","constants","config",
+,1,1,1,3,100,"","
+page = PAGE
+page.typeNum = 0
+
+plugin.tx_solr {
+ search.query.trigramPhrase = 1
+ enabled = 1
+
+ index {
+ fieldProcessingInstructions {
+ changed = timestampToIsoDate
+ created = timestampToIsoDate
+ endtime = timestampToUtcIsoDate
+ rootline = pageUidToHierarchy
+ }
+
+ queue {
+
+ // mapping tableName.fields.SolrFieldName => TableFieldName (+ cObj processing)
+
+ pages = 1
+ pages {
+ initialization = ApacheSolrForTypo3\Solr\IndexQueue\Initializer\Page
+
+ // allowed page types (doktype) when indexing pages
+ allowedPageTypes = 1,7
+
+ indexingPriority = 0
+
+ indexer = ApacheSolrForTypo3\Solr\IndexQueue\PageIndexer
+ indexer {
+ // add options for the indexer here
+ }
+
+ // Only index standard pages and mount points that are not overlayed.
+ additionalWhereClause = (doktype = 1 OR (doktype=7 AND mount_pid_ol=0)) AND no_search = 0
+
+ fields {
+ sortSubTitle_stringS = subtitle
+ }
+ }
+ }
+ }
+}"
diff --git a/Tests/Integration/Fixtures/can_search.xml b/Tests/Integration/Fixtures/can_search.xml
deleted file mode 100644
index 033a05df7b..0000000000
--- a/Tests/Integration/Fixtures/can_search.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
-
-
-
- 1
- 1
- 1
- 3
-
-
-
- plugin.tx_solr {
-
- enabled = 1
-
- index {
- fieldProcessingInstructions {
- changed = timestampToIsoDate
- created = timestampToIsoDate
- endtime = timestampToUtcIsoDate
- rootline = pageUidToHierarchy
- }
-
- queue {
-
- // mapping tableName.fields.SolrFieldName => TableFieldName (+ cObj processing)
-
- pages = 1
- pages {
- initialization = ApacheSolrForTypo3\Solr\IndexQueue\Initializer\Page
-
- // allowed page types (doktype) when indexing records from table "pages"
- allowedPageTypes = 1,7
-
- indexingPriority = 0
-
- indexer = ApacheSolrForTypo3\Solr\IndexQueue\PageIndexer
- indexer {
- // add options for the indexer here
- }
-
- // Only index standard pages and mount points that are not overlayed.
- additionalWhereClause = (doktype = 1 OR (doktype=7 AND mount_pid_ol=0)) AND no_search = 0
-
- fields {
- sortSubTitle_stringS = subtitle
- }
- }
-
- }
- }
- }
- ]]>
-
- 100
-
-
- 1
- 1
- 1
- Hello Search Test
-
-
\ No newline at end of file
diff --git a/Tests/Integration/Fixtures/phrase_search.xml b/Tests/Integration/Fixtures/phrase_search.xml
deleted file mode 100644
index c9ddf72a4a..0000000000
--- a/Tests/Integration/Fixtures/phrase_search.xml
+++ /dev/null
@@ -1,182 +0,0 @@
-
-
-
-
- 1
- 1
- 1
- 3
-
-
-
- plugin.tx_solr {
-
- search.query.phrase = 1
-
- enabled = 1
-
- index {
- fieldProcessingInstructions {
- changed = timestampToIsoDate
- created = timestampToIsoDate
- endtime = timestampToUtcIsoDate
- rootline = pageUidToHierarchy
- }
-
- queue {
-
- // mapping tableName.fields.SolrFieldName => TableFieldName (+ cObj processing)
-
- pages = 1
- pages {
- initialization = ApacheSolrForTypo3\Solr\IndexQueue\Initializer\Page
-
- // allowed page types (doktype) when indexing records from table "pages"
- allowedPageTypes = 1,7
-
- indexingPriority = 0
-
- indexer = ApacheSolrForTypo3\Solr\IndexQueue\PageIndexer
- indexer {
- // add options for the indexer here
- }
-
- // Only index standard pages and mount points that are not overlayed.
- additionalWhereClause = (doktype = 1 OR (doktype=7 AND mount_pid_ol=0)) AND no_search = 0
-
- fields {
- sortSubTitle_stringS = subtitle
- }
- }
-
- }
- }
- }
- ]]>
-
- 100
-
-
-
- 1
- 1
- 1
- World Hello Search Test
-
-
- 2
- 1
- 0
- 1
- 0
- Hello you can improve the precision by using phrase configuration World
-
-
- 3
- 1
- 0
- 1
- 0
- Hello phrase search World
-
-
- 4
- 1
- 0
- 1
- 0
- Hello Test wonderful World
-
-
- 5
- 1
- 0
- 1
- 0
- Hello wonderful Test World
-
-
- 6
- 1
- 0
- 1
- 0
- Bigraming phrases strip down the sentence to the two-word combinations.
-
-
- 7
- 1
- 0
- 1
- 0
- Trigraming phrases strip down the sentence to triplets phrases
-
-
- 8
- 1
- 0
- 1
- 0
- Difference to bi is tri, which means building of triplets phrases.
-
-
- 9
- 1
- 0
- 1
- 0
- Hello Solr Wolrd
-
-
- 10
- 1
- 0
- 1
- 0
- Hello Test Wolrd
-
-
- 11
- 1
- 0
- 1
- 0
- Test Hello Solr World
-
-
- 12
- 1
- 0
- 1
- 0
- Test Hello Search World
-
-
- 13
- 1
- 0
- 1
- 0
- Hello the Test Search World
-
-
- 14
- 1
- 0
- 1
- 0
- Hello World for phrase searching
-
-
- 15
- 1
- 0
- 1
- 0
- Solr is blazing-fast and open source enterprise search platform built on Apache Lucene
-
-
\ No newline at end of file
diff --git a/Tests/Integration/Fixtures/phrase_search_bigram.xml b/Tests/Integration/Fixtures/phrase_search_bigram.xml
deleted file mode 100644
index f7a9ed1f4c..0000000000
--- a/Tests/Integration/Fixtures/phrase_search_bigram.xml
+++ /dev/null
@@ -1,186 +0,0 @@
-
-
-
-
-
- 1
- 1
- 1
- 3
-
-
-
- plugin.tx_solr {
-
- search.query.bigramPhrase = 1
-
- enabled = 1
-
- index {
- fieldProcessingInstructions {
- changed = timestampToIsoDate
- created = timestampToIsoDate
- endtime = timestampToUtcIsoDate
- rootline = pageUidToHierarchy
- }
-
- queue {
-
- // mapping tableName.fields.SolrFieldName => TableFieldName (+ cObj processing)
-
- pages = 1
- pages {
- initialization = ApacheSolrForTypo3\Solr\IndexQueue\Initializer\Page
-
- // allowed page types (doktype) when indexing records from table "pages"
- allowedPageTypes = 1,7
-
- indexingPriority = 0
-
- indexer = ApacheSolrForTypo3\Solr\IndexQueue\PageIndexer
- indexer {
- // add options for the indexer here
- }
-
- // Only index standard pages and mount points that are not overlayed.
- additionalWhereClause = (doktype = 1 OR (doktype=7 AND mount_pid_ol=0)) AND no_search = 0
-
- fields {
- sortSubTitle_stringS = subtitle
- }
- }
-
- }
- }
- }
- ]]>
-
- 100
-
-
-
- 1
- 1
- 1
- Bigram Phrase Search
-
-
-
- 2
- 1
- 0
- 1
- 0
- This is some dump sentence to match Bigram Phrase
-
-
- 3
- 1
- 0
- 1
- 0
- This is some dump sentence to match Phrase Search
-
-
-
- 4
- 1
- 0
- 1
- 0
- This is some dump sentence to match slop 1 Bigram gag Phrase
-
-
- 5
- 1
- 0
- 1
- 0
- This is some dump sentence to match slop 1 Phrase gag Search
-
-
-
- 6
- 1
- 0
- 1
- 0
- This is some dump sentence to match slop 2 Bigram gag gag Phrase
-
-
- 7
- 1
- 0
- 1
- 0
- This is some dump sentence to match slop 2 Phrase gag gag Search
-
-
- 8
- 1
- 0
- 1
- 0
- This is some dump sentence to match no docs
-
-
- 9
- 1
- 0
- 1
- 0
- This is some dump sentence to match nothing
-
-
- 10
- 1
- 0
- 1
- 0
- To disable BPhrase set it to 0.
-
-
- 11
- 1
- 0
- 1
- 0
- This is some dump sentence to match Phrase only
-
-
- 12
- 1
- 0
- 1
- 0
- This is some dump sentence to match Search only
-
-
- 13
- 1
- 0
- 1
- 0
- This is some dump sentence to match Bigram only
-
-
- 14
- 1
- 0
- 1
- 0
- Implicit Bigram gag gag gag gag Phrase gag gag gag gag searches in pf2 fields.
-
-
- 15
- 1
- 0
- 1
- 0
- Bigram gag gag gag gag Phrase gag gag gag gag Search is fascinating feature.
-
-
\ No newline at end of file
diff --git a/Tests/Integration/Fixtures/phrase_search_trigram.xml b/Tests/Integration/Fixtures/phrase_search_trigram.xml
deleted file mode 100644
index a6b1438f8b..0000000000
--- a/Tests/Integration/Fixtures/phrase_search_trigram.xml
+++ /dev/null
@@ -1,186 +0,0 @@
-
-
-
-
-
- 1
- 1
- 1
- 3
-
-
-
- plugin.tx_solr {
-
- search.query.trigramPhrase = 1
-
- enabled = 1
-
- index {
- fieldProcessingInstructions {
- changed = timestampToIsoDate
- created = timestampToIsoDate
- endtime = timestampToUtcIsoDate
- rootline = pageUidToHierarchy
- }
-
- queue {
-
- // mapping tableName.fields.SolrFieldName => TableFieldName (+ cObj processing)
-
- pages = 1
- pages {
- initialization = ApacheSolrForTypo3\Solr\IndexQueue\Initializer\Page
-
- // allowed page types (doktype) when indexing records from table "pages"
- allowedPageTypes = 1,7
-
- indexingPriority = 0
-
- indexer = ApacheSolrForTypo3\Solr\IndexQueue\PageIndexer
- indexer {
- // add options for the indexer here
- }
-
- // Only index standard pages and mount points that are not overlayed.
- additionalWhereClause = (doktype = 1 OR (doktype=7 AND mount_pid_ol=0)) AND no_search = 0
-
- fields {
- sortSubTitle_stringS = subtitle
- }
- }
-
- }
- }
- }
- ]]>
-
- 100
-
-
-
- 1
- 1
- 1
- Awesome Trigram Phrase Search
-
-
-
- 2
- 1
- 0
- 1
- 0
- This is some dump sentence to match Awesome Trigram Phrase
-
-
- 3
- 1
- 0
- 1
- 0
- This is some dump sentence to match Trigram Phrase Search
-
-
-
- 4
- 1
- 0
- 1
- 0
- This is some dump sentence to match slop 1 Awesome gag Trigram Phrase
-
-
- 5
- 1
- 0
- 1
- 0
- This is some dump sentence to match slop 1 Trigram Phrase gag Search
-
-
-
- 6
- 1
- 0
- 1
- 0
- This is some dump sentence to match slop 2 Awesome gag gag Trigram Phrase
-
-
- 7
- 1
- 0
- 1
- 0
- This is some dump sentence to match slop 2 Trigram Phrase gag gag Search
-
-
- 8
- 1
- 0
- 1
- 0
- This is some dump sentence to match no docs
-
-
- 9
- 1
- 0
- 1
- 0
- This is some dump sentence to match nothing
-
-
- 10
- 1
- 0
- 1
- 0
- To disable BPhrase set it to 0.
-
-
- 11
- 1
- 0
- 1
- 0
- This is some dump sentence to match Phrase only
-
-
- 12
- 1
- 0
- 1
- 0
- This is some dump sentence to match Search only
-
-
- 13
- 1
- 0
- 1
- 0
- This is some dump sentence to match Trigram only
-
-
- 14
- 1
- 0
- 1
- 0
- This is some dump sentence to match Awesome only
-
-
- 15
- 1
- 0
- 1
- 0
- Trigram gag gag gag gag Phrase gag gag gag gag Search is fascinating feature.
-
-
\ No newline at end of file
diff --git a/Tests/Integration/Fixtures/sites_setup_and_data_set/01_integration_tree_one.csv b/Tests/Integration/Fixtures/sites_setup_and_data_set/01_integration_tree_one.csv
new file mode 100644
index 0000000000..4a21ca7244
--- /dev/null
+++ b/Tests/Integration/Fixtures/sites_setup_and_data_set/01_integration_tree_one.csv
@@ -0,0 +1,6 @@
+"pages",
+,"uid","is_siteroot","doktype","hidden","title","slug","author"
+,1,1,1,0,"Root of Testpage testone.site aka integration_tree_one","/","John Doe"
+"sys_template",
+,"uid","pid","root","clear","config","constants","sorting"
+,1,1,1,3,"@import 'EXT:solr/Tests/Integration/Fixtures/sites_setup_and_data_set/Integration.setup.typoscript'","@import 'EXT:solr/Tests/Integration/Fixtures/sites_setup_and_data_set/Integration.constants.typoscript'",100
diff --git a/Tests/Integration/Fixtures/sites_setup_and_data_set/01_integration_tree_one.xml b/Tests/Integration/Fixtures/sites_setup_and_data_set/01_integration_tree_one.xml
deleted file mode 100644
index 872bf589fe..0000000000
--- a/Tests/Integration/Fixtures/sites_setup_and_data_set/01_integration_tree_one.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
- 1
- 1
- 1
- 3
-
-
-
-
-
-
- 100
-
-
- 1
- 1
- 1
- 0
- Root of Testpage testone.site aka integration_tree_one
- /
-
-
diff --git a/Tests/Integration/Fixtures/sites_setup_and_data_set/02_integration_tree_two.csv b/Tests/Integration/Fixtures/sites_setup_and_data_set/02_integration_tree_two.csv
new file mode 100644
index 0000000000..060b0123f2
--- /dev/null
+++ b/Tests/Integration/Fixtures/sites_setup_and_data_set/02_integration_tree_two.csv
@@ -0,0 +1,6 @@
+"pages",
+,"uid","is_siteroot","doktype","hidden","title","slug"
+,111,1,1,0,"Root of Testpage testtwo.site aka integration_tree_two","/"
+"sys_template",
+,"uid","pid","root","clear","config","constants","sorting"
+,111,111,1,3,"@import 'EXT:solr/Tests/Integration/Fixtures/sites_setup_and_data_set/Integration.setup.typoscript'","@import 'EXT:solr/Tests/Integration/Fixtures/sites_setup_and_data_set/Integration.constants.typoscript'",100
diff --git a/Tests/Integration/Fixtures/sites_setup_and_data_set/02_integration_tree_two.xml b/Tests/Integration/Fixtures/sites_setup_and_data_set/02_integration_tree_two.xml
deleted file mode 100644
index 326a940892..0000000000
--- a/Tests/Integration/Fixtures/sites_setup_and_data_set/02_integration_tree_two.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
- 111
- 111
- 1
- 3
-
-
-
-
-
-
- 100
-
-
- 111
- 1
- 1
- 0
- Root of Testpage testtwo.site aka integration_tree_two
- /
-
-
diff --git a/Tests/Integration/Fixtures/sites_setup_and_data_set/03_integration_tree_three.csv b/Tests/Integration/Fixtures/sites_setup_and_data_set/03_integration_tree_three.csv
new file mode 100644
index 0000000000..12890b865f
--- /dev/null
+++ b/Tests/Integration/Fixtures/sites_setup_and_data_set/03_integration_tree_three.csv
@@ -0,0 +1,6 @@
+"pages",
+,"uid","is_siteroot","doktype","hidden","title","slug"
+,211,1,1,0,"Root of Testpage testthree.site aka integration_tree_three","/"
+"sys_template",
+,"uid","pid","root","clear","config","constants","sorting"
+,211,211,1,3,"@import 'EXT:solr/Tests/Integration/Fixtures/sites_setup_and_data_set/Integration.setup.typoscript'","@import 'EXT:solr/Tests/Integration/Fixtures/sites_setup_and_data_set/Integration.constants.typoscript'",100
diff --git a/Tests/Integration/Fixtures/sites_setup_and_data_set/03_integration_tree_three.xml b/Tests/Integration/Fixtures/sites_setup_and_data_set/03_integration_tree_three.xml
deleted file mode 100644
index 9bdad2cc23..0000000000
--- a/Tests/Integration/Fixtures/sites_setup_and_data_set/03_integration_tree_three.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
- 211
- 211
- 1
- 3
-
-
-
-
-
-
- 100
-
-
- 211
- 1
- 1
- 0
- Root of Testpage testthree.site aka integration_tree_three
- /
-
-
diff --git a/Tests/Integration/FrontendEnvironment/Fixtures/initialize_tsfe_with_no_default_page_and_page_error_handler_do_not_throw_an_error.csv b/Tests/Integration/FrontendEnvironment/Fixtures/initialize_tsfe_with_no_default_page_and_page_error_handler_do_not_throw_an_error.csv
new file mode 100644
index 0000000000..b54ace6d8f
--- /dev/null
+++ b/Tests/Integration/FrontendEnvironment/Fixtures/initialize_tsfe_with_no_default_page_and_page_error_handler_do_not_throw_an_error.csv
@@ -0,0 +1,13 @@
+"pages",
+,"uid","pid","is_siteroot","doktype","slug","l18n_cfg","title"
+,1,0,1,1,"/",1,"disabled for default language"
+,404,1,0,1,"/404",1,"error page, required for testing"
+"sys_template",
+,"uid","pid","root","clear","sorting","config"
+,1,1,1,1,3,100,"
+page = PAGE
+page.typeNum = 0
+
+config.index_enable = 1
+plugin.tx_solr.enabled = 1
+"
diff --git a/Tests/Integration/FrontendEnvironment/Fixtures/initialize_tsfe_with_no_default_page_and_page_error_handler_do_not_throw_an_error.xml b/Tests/Integration/FrontendEnvironment/Fixtures/initialize_tsfe_with_no_default_page_and_page_error_handler_do_not_throw_an_error.xml
deleted file mode 100644
index f529299b20..0000000000
--- a/Tests/Integration/FrontendEnvironment/Fixtures/initialize_tsfe_with_no_default_page_and_page_error_handler_do_not_throw_an_error.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
- 1
- 1
- 1
- 3
-
-
-
- config.index_enable = 1
-
- plugin.tx_solr {
- enabled = 1
- }
- ]]>
-
- 100
-
-
- 1
- 1
- 1
- disabled for default language
- 1
-
-
- 404
- 1
- error page, required for testing
-
-
diff --git a/Tests/Integration/FrontendEnvironment/TsfeTest.php b/Tests/Integration/FrontendEnvironment/TsfeTest.php
index 1648899157..477175cacc 100644
--- a/Tests/Integration/FrontendEnvironment/TsfeTest.php
+++ b/Tests/Integration/FrontendEnvironment/TsfeTest.php
@@ -19,7 +19,7 @@ public function initializeTsfeWithNoDefaultPageAndPageErrorHandlerDoNotThrowAnEr
https://github.com/TYPO3-Solr/ext-solr/issues/2914
https://github.com/TYPO3-Solr/ext-solr/pull/2915/files');
$this->expectException(RuntimeException::class);
- $this->importDataSetFromFixture('initialize_tsfe_with_no_default_page_and_page_error_handler_do_not_throw_an_error.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/initialize_tsfe_with_no_default_page_and_page_error_handler_do_not_throw_an_error.csv');
$defaultLanguage = $this->buildDefaultLanguageConfiguration('EN', '/en/');
$defaultLanguage['solr_core_read'] = 'core_en';
diff --git a/Tests/Integration/IntegrationTest.php b/Tests/Integration/IntegrationTest.php
index 351853e44b..befc351c22 100644
--- a/Tests/Integration/IntegrationTest.php
+++ b/Tests/Integration/IntegrationTest.php
@@ -533,11 +533,9 @@ private function importRootPagesAndTemplatesForConfiguredSites(): void
if ($this->skipImportRootPagesAndTemplatesForConfiguredSites === true) {
return;
}
- $rc = new ReflectionClass(self::class);
- $path = dirname($rc->getFileName());
- $this->importDataSet($path . '/Fixtures/sites_setup_and_data_set/01_integration_tree_one.xml');
- $this->importDataSet($path . '/Fixtures/sites_setup_and_data_set/02_integration_tree_two.xml');
- $this->importDataSet($path . '/Fixtures/sites_setup_and_data_set/03_integration_tree_three.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/sites_setup_and_data_set/01_integration_tree_one.csv');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/sites_setup_and_data_set/02_integration_tree_two.csv');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/sites_setup_and_data_set/03_integration_tree_three.csv');
}
/**
diff --git a/Tests/Integration/SearchTest.php b/Tests/Integration/SearchTest.php
index 733bf0e5ab..f6cc12966b 100644
--- a/Tests/Integration/SearchTest.php
+++ b/Tests/Integration/SearchTest.php
@@ -66,7 +66,7 @@ protected function tearDown(): void
*/
public function canSearchForADocument()
{
- $this->importDataSetFromFixture('can_search.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/Search/can_search.csv');
$GLOBALS['TT'] = $this->createMock(TimeTracker::class);
$fakeTSFE = $this->getConfiguredTSFE();
@@ -102,6 +102,7 @@ public function canSearchForADocument()
*/
public function implicitPhraseSearchingBoostsDocsWithOccurringPhrase()
{
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/Search/phrase_search.csv');
$this->fillIndexForPhraseSearchTests();
/* @var \ApacheSolrForTypo3\Solr\Search $searchInstance */
@@ -135,6 +136,7 @@ public function implicitPhraseSearchingBoostsDocsWithOccurringPhrase()
*/
public function implicitPhraseSearchSloppyPhraseBoostCanBeAdjustedByPhraseSlop()
{
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/Search/phrase_search.csv');
$this->fillIndexForPhraseSearchTests();
/* @var \ApacheSolrForTypo3\Solr\Search $searchInstance */
@@ -206,7 +208,8 @@ public function implicitPhraseSearchSloppyPhraseBoostCanBeAdjustedByPhraseSlop()
*/
public function implicitPhraseSearchSloppyPhraseBoostCanBeAdjustedByBigramPhraseSlop()
{
- $this->fillIndexForPhraseSearchTests('phrase_search_bigram.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/Search/phrase_search_bigram.csv');
+ $this->fillIndexForPhraseSearchTests();
/* @var \ApacheSolrForTypo3\Solr\Search $searchInstance */
$searchInstance = GeneralUtility::makeInstance(Search::class);
@@ -291,7 +294,8 @@ public function implicitPhraseSearchSloppyPhraseBoostCanBeAdjustedByBigramPhrase
*/
public function implicitPhraseSearchSloppyPhraseBoostCanBeAdjustedByTrigramPhraseSlop()
{
- $this->fillIndexForPhraseSearchTests('phrase_search_trigram.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/Search/phrase_search_trigram.csv');
+ $this->fillIndexForPhraseSearchTests();
/* @var \ApacheSolrForTypo3\Solr\Search $searchInstance */
$searchInstance = GeneralUtility::makeInstance(Search::class);
@@ -371,6 +375,7 @@ public function implicitPhraseSearchSloppyPhraseBoostCanBeAdjustedByTrigramPhras
*/
public function explicitPhraseSearchMatchesMorePrecise()
{
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/Search/phrase_search.csv');
$this->fillIndexForPhraseSearchTests();
/* @var \ApacheSolrForTypo3\Solr\Search $searchInstance */
@@ -393,6 +398,7 @@ public function explicitPhraseSearchMatchesMorePrecise()
*/
public function explicitPhraseSearchPrecisionCanBeAdjustedByQuerySlop()
{
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/Search/phrase_search.csv');
$this->fillIndexForPhraseSearchTests();
/* @var \ApacheSolrForTypo3\Solr\Search $searchInstance */
@@ -429,13 +435,8 @@ public function explicitPhraseSearchPrecisionCanBeAdjustedByQuerySlop()
self::assertSame(7, $parsedData->response->numFound, 'Found wrong number of decuments by explicit phrase search query.');
}
- /**
- * @param string $fixture
- */
- protected function fillIndexForPhraseSearchTests(string $fixture = 'phrase_search.xml')
+ protected function fillIndexForPhraseSearchTests()
{
- $this->importDataSetFromFixture($fixture);
-
$GLOBALS['TT'] = $this->createMock(TimeTracker::class);
for ($i = 1; $i <= 15; $i++) {
$fakeTSFE = $this->getConfiguredTSFE($i);
diff --git a/Tests/Integration/System/Configuration/ConfigurationPageResolverTest.php b/Tests/Integration/System/Configuration/ConfigurationPageResolverTest.php
index 807ee812d7..9f3dbcb372 100644
--- a/Tests/Integration/System/Configuration/ConfigurationPageResolverTest.php
+++ b/Tests/Integration/System/Configuration/ConfigurationPageResolverTest.php
@@ -29,7 +29,7 @@ class ConfigurationPageResolverTest extends IntegrationTest
*/
public function canGetClosestPageIdWithActiveTemplate()
{
- $this->importDataSetFromFixture('can_get_closest_template_page_id.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/can_get_closest_template_page_id.csv');
/* @var ConfigurationPageResolver $configurationPageIdResolver */
$configurationPageIdResolver = GeneralUtility::makeInstance(ConfigurationPageResolver::class);
diff --git a/Tests/Integration/System/Configuration/Fixtures/can_get_closest_template_page_id.csv b/Tests/Integration/System/Configuration/Fixtures/can_get_closest_template_page_id.csv
new file mode 100644
index 0000000000..342cf3c5ff
--- /dev/null
+++ b/Tests/Integration/System/Configuration/Fixtures/can_get_closest_template_page_id.csv
@@ -0,0 +1,11 @@
+"pages",
+,"uid","pid","is_siteroot","doktype","slug","title"
+,1,0,1,1,"/","Rootpage"
+,2,1,0,1,"/subpage","Subpage with template"
+,3,2,0,1,"/subsubpage","Subsubpage with deleted template"
+,4,3,0,1,"/subsubsubpage","Subsubsubpage",
+"sys_template",
+,"uid","pid","root","clear","sorting","deleted","config"
+,1,1,1,3,100,0,""
+,2,2,0,3,100,0,""
+,3,3,0,3,100,1,""
diff --git a/Tests/Integration/System/Configuration/Fixtures/can_get_closest_template_page_id.xml b/Tests/Integration/System/Configuration/Fixtures/can_get_closest_template_page_id.xml
deleted file mode 100644
index 563c669305..0000000000
--- a/Tests/Integration/System/Configuration/Fixtures/can_get_closest_template_page_id.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
-
- 1
- 1
- 1
- 3
-
-
-
- 100
-
-
-
- 2
- 2
- 0
- 3
-
-
-
- 100
-
-
-
- 3
- 3
- 0
- 3
-
-
-
- 100
- 1
-
-
-
- 1
- 1
- 1
- 0
- 0
- Rootpage
-
-
- 2
- 1
- 0
- 1
- Subpage with template
-
-
- 3
- 1
- 0
- 2
- Subsubpage with deleted template
-
-
-
- 4
- 1
- 0
- 3
- Subsubsubpage
-
-
\ No newline at end of file
diff --git a/Tests/Integration/System/Records/Pages/Fixtures/can_find_mount_pages_in_rootline.csv b/Tests/Integration/System/Records/Pages/Fixtures/can_find_mount_pages_in_rootline.csv
new file mode 100644
index 0000000000..57d3780571
--- /dev/null
+++ b/Tests/Integration/System/Records/Pages/Fixtures/can_find_mount_pages_in_rootline.csv
@@ -0,0 +1,57 @@
+"pages",
+# Shared Pages tree
+,"uid","pid","is_siteroot","doktype","mount_pid","mount_pid_ol","slug","title"
+,20,0,0,254,0,0,"/shared-pages","Shared-Pages"
+,24,20,0,1,0,0,"/first-shared","FirstShared (Not root)"
+,25,24,0,1,0,0,"/first-subpage-from-first-shared","first sub page from FirstShared (Not root)"
+,26,24,0,1,0,0,"/second-subpage-from-first-shared","second sub page from FirstShared (Not root)"
+# Site tree
+,1,1,1,1,0,0,"/","Page (Root)"
+,14,1,0,7,24,1,"/mount-point-1","Mount Point 1"
+# Second Site tree
+,3,0,1,1,0,0,"/","Second Site (Root)"
+,34,3,0,7,25,1,"/mount-point-2","Mount Point 2"
+"sys_template",
+,"uid","pid","root","clear","sorting","config"
+,1,1,1,3,100,"
+page = PAGE
+page.typeNum = 0
+
+plugin.tx_solr {
+ enabled = 1
+
+ index {
+ fieldProcessingInstructions {
+ changed = timestampToIsoDate
+ created = timestampToIsoDate
+ endtime = timestampToUtcIsoDate
+ rootline = pageUidToHierarchy
+ }
+
+ queue {
+ // mapping tableName.fields.SolrFieldName => TableFieldName (+ cObj processing)
+ pages = 1
+ pages {
+ initialization = ApacheSolrForTypo3\Solr\IndexQueue\Initializer\Page
+
+ // allowed page types (doktype) when indexing pages
+ allowedPageTypes = 1,7
+
+ indexingPriority = 0
+
+ indexer = ApacheSolrForTypo3\Solr\IndexQueue\PageIndexer
+ indexer {
+ // add options for the indexer here
+ }
+
+ // Only index standard pages and mount points that are not overlayed.
+ additionalWhereClause = (doktype = 1 OR (doktype=7 AND mount_pid_ol=0)) AND no_search = 0
+
+ fields {
+ sortSubTitle_stringS = subtitle
+ }
+ }
+
+ }
+ }
+}"
diff --git a/Tests/Integration/System/Records/Pages/Fixtures/can_find_mout_pages_in_rootline.xml b/Tests/Integration/System/Records/Pages/Fixtures/can_find_mout_pages_in_rootline.xml
deleted file mode 100644
index 1b313aa027..0000000000
--- a/Tests/Integration/System/Records/Pages/Fixtures/can_find_mout_pages_in_rootline.xml
+++ /dev/null
@@ -1,173 +0,0 @@
-
-
-
-
-
-
- 1
- 1
- 1
- 3
-
-
-
- plugin.tx_solr {
-
- enabled = 1
-
-
- index {
- fieldProcessingInstructions {
- changed = timestampToIsoDate
- created = timestampToIsoDate
- endtime = timestampToUtcIsoDate
- rootline = pageUidToHierarchy
- }
-
- queue {
-
- // mapping tableName.fields.SolrFieldName => TableFieldName (+ cObj processing)
-
- pages = 1
- pages {
- initialization = ApacheSolrForTypo3\Solr\IndexQueue\Initializer\Page
-
- // allowed page types (doktype) when indexing records from table "pages"
- allowedPageTypes = 1,7
-
- indexingPriority = 0
-
- indexer = ApacheSolrForTypo3\Solr\IndexQueue\PageIndexer
- indexer {
- // add options for the indexer here
- }
-
- // Only index standard pages and mount points that are not overlayed.
- additionalWhereClause = (doktype = 1 OR (doktype=7 AND mount_pid_ol=0)) AND no_search = 0
-
- fields {
- sortSubTitle_stringS = subtitle
- }
- }
-
- }
- }
- }
- ]]>
-
- 100
-
-
-
-
- 20
- 0
- 0
- 254
- 0
- 0
- Shared-Pages
-
-
-
-
- 24
- 20
- 0
- 1
- 0
- 0
- FirstShared (Not root)
-
-
-
-
- 25
- 24
- 0
- 1
- 0
- 0
- first sub page from FirstShared (Not root)
-
-
-
-
- 26
- 24
- 0
- 1
- 0
- 0
- second sub page from FirstShared (Not root)
-
-
-
-
-
-
-
- 1
- 1
- 1
- 0
- Page (Root)
-
-
- 14
- 1
- 0
- 7
- 24
- 1
- Mount Point 1
-
- 0
-
-
-
-
-
- 3
- 1
- 1
- 0
- Second Site (Root)
-
-
- 34
- 3
- 0
- 7
- 25
- 1
- Mount Point 2
-
- 0
-
-
-
\ No newline at end of file
diff --git a/Tests/Integration/System/Records/Pages/Fixtures/pages.csv b/Tests/Integration/System/Records/Pages/Fixtures/pages.csv
new file mode 100644
index 0000000000..eb10f5d1be
--- /dev/null
+++ b/Tests/Integration/System/Records/Pages/Fixtures/pages.csv
@@ -0,0 +1,7 @@
+"pages",
+,"uid","pid","is_siteroot","slug","title"
+,1,0,1,"/","Products"
+,2,1,0,"/category-1","Category 1"
+,3,1,0,"/category-2","Category 2"
+,4,1,0,"/category-3","Category 3"
+,5,3,1,"/","Support"
diff --git a/Tests/Integration/System/Records/Pages/Fixtures/pages.xml b/Tests/Integration/System/Records/Pages/Fixtures/pages.xml
deleted file mode 100644
index ddebf9fbd5..0000000000
--- a/Tests/Integration/System/Records/Pages/Fixtures/pages.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
- 1
- 1
- Products
-
-
- 2
- 1
- 0
- Category 1
-
-
- 3
- 1
- 0
- Category 2
-
-
- 4
- 1
- 0
- Category 3
-
-
- 5
- 3
- 1
- Support
-
-
\ No newline at end of file
diff --git a/Tests/Integration/System/Records/Pages/PagesRepositoryTest.php b/Tests/Integration/System/Records/Pages/PagesRepositoryTest.php
index e5a6aa8035..99835eb041 100644
--- a/Tests/Integration/System/Records/Pages/PagesRepositoryTest.php
+++ b/Tests/Integration/System/Records/Pages/PagesRepositoryTest.php
@@ -20,7 +20,7 @@
use TYPO3\CMS\Core\Utility\GeneralUtility;
/**
- * Integration tes for PagesRepository.
+ * Integration tests for PagesRepository.
*/
class PagesRepositoryTest extends IntegrationTest
{
@@ -40,7 +40,7 @@ protected function setUp(): void
*/
public function canFindAllRootPages()
{
- $this->importDataSetFromFixture('pages.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/pages.csv');
$expectedResult = [
0 => [
@@ -75,13 +75,13 @@ public function canFindAllRootPages()
* | |
* | ——[24] FirstShared
* | |
- * | ——[25] first sub page from FirstShared
+ * | ——[25] first subpage from FirstShared
* | |
- * | ——[26] second sub page from FirstShared
+ * | ——[26] second subpage from FirstShared
*/
public function canfindMountPointPagesByRootLineParentPageIdsIfMountedPagesIsOutsideOfTheSite()
{
- $this->importDataSetFromFixture('can_find_mout_pages_in_rootline.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/can_find_mount_pages_in_rootline.csv');
$expectedResult = [
[
diff --git a/Tests/Integration/System/Records/SystemCategory/Fixtures/sys_category.csv b/Tests/Integration/System/Records/SystemCategory/Fixtures/sys_category.csv
new file mode 100644
index 0000000000..a622c60345
--- /dev/null
+++ b/Tests/Integration/System/Records/SystemCategory/Fixtures/sys_category.csv
@@ -0,0 +1,4 @@
+"sys_category",
+,"uid","pid","parent","title"
+,1,1,0,"root"
+,2,1,1,"child"
diff --git a/Tests/Integration/System/Records/SystemCategory/Fixtures/sys_category.xml b/Tests/Integration/System/Records/SystemCategory/Fixtures/sys_category.xml
deleted file mode 100644
index 353fc17677..0000000000
--- a/Tests/Integration/System/Records/SystemCategory/Fixtures/sys_category.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
- 1
- 1
- 0
- root
-
-
-
- 2
- 1
- 1
- child
-
-
-
\ No newline at end of file
diff --git a/Tests/Integration/System/Records/SystemCategory/SystemCategoryRepositoryTest.php b/Tests/Integration/System/Records/SystemCategory/SystemCategoryRepositoryTest.php
index 1b14792c3b..682262bec0 100644
--- a/Tests/Integration/System/Records/SystemCategory/SystemCategoryRepositoryTest.php
+++ b/Tests/Integration/System/Records/SystemCategory/SystemCategoryRepositoryTest.php
@@ -31,7 +31,7 @@ class SystemCategoryRepositoryTest extends IntegrationTest
*/
public function canFindOneByParentCategory()
{
- $this->importDataSetFromFixture('sys_category.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/sys_category.csv');
/* @var SystemCategoryRepository $repository */
$repository = GeneralUtility::makeInstance(SystemCategoryRepository::class);
diff --git a/Tests/Integration/System/Records/SystemTemplate/Fixtures/sys_template.csv b/Tests/Integration/System/Records/SystemTemplate/Fixtures/sys_template.csv
new file mode 100644
index 0000000000..9056f05d20
--- /dev/null
+++ b/Tests/Integration/System/Records/SystemTemplate/Fixtures/sys_template.csv
@@ -0,0 +1,3 @@
+"sys_template",
+,"uid","pid","root","sorting","config"
+,777,33,1,100,"page = PAGE"
diff --git a/Tests/Integration/System/Records/SystemTemplate/Fixtures/sys_template.xml b/Tests/Integration/System/Records/SystemTemplate/Fixtures/sys_template.xml
deleted file mode 100644
index 08d6dee436..0000000000
--- a/Tests/Integration/System/Records/SystemTemplate/Fixtures/sys_template.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
- 777
- 33
- 1
-
-
-
- 100
-
-
\ No newline at end of file
diff --git a/Tests/Integration/System/Records/SystemTemplate/SystemTemplateRepositoryTest.php b/Tests/Integration/System/Records/SystemTemplate/SystemTemplateRepositoryTest.php
index ec7ef16c8c..f24945aa5b 100644
--- a/Tests/Integration/System/Records/SystemTemplate/SystemTemplateRepositoryTest.php
+++ b/Tests/Integration/System/Records/SystemTemplate/SystemTemplateRepositoryTest.php
@@ -31,7 +31,7 @@ class SystemTemplateRepositoryTest extends IntegrationTest
*/
public function canFindOneClosestPageIdWithActiveTemplateByRootLine()
{
- $this->importDataSetFromFixture('sys_template.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/sys_template.csv');
$fakeRootLine = [
['uid' => 100],
diff --git a/Tests/Integration/System/Solr/Fixtures/SolrConnectionTest_slim_basic_sites.xml b/Tests/Integration/System/Solr/Fixtures/SolrConnectionTest_slim_basic_sites.xml
deleted file mode 100644
index ae8f236dc2..0000000000
--- a/Tests/Integration/System/Solr/Fixtures/SolrConnectionTest_slim_basic_sites.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
-
-
-
-
- 11
- 1
- 0
- 7
- 24
- 1
- Subpage of first site
-
- 0
-
-
-
-
-
- 21
- 111
- 0
- 7
- 24
- 1
- Subpage of second site
-
- 0
-
-
-
-
-
-
- 3
- 0
- 1
- 0
- Detached and non Root Page-Tree
-
-
- 31
- 3
- 0
- 7
- 24
- 1
- Subpage 1 of Detached
-
- 0
-
-
-
- 32
- 3
- 0
- 7
- 24
- 1
- Subpage 2 of Detached
-
- 0
-
-
-
diff --git a/Tests/Integration/System/Solr/Fixtures/slim_basic_sites.csv b/Tests/Integration/System/Solr/Fixtures/slim_basic_sites.csv
new file mode 100644
index 0000000000..a743f2f540
--- /dev/null
+++ b/Tests/Integration/System/Solr/Fixtures/slim_basic_sites.csv
@@ -0,0 +1,12 @@
+"pages",
+,"uid","pid","is_siteroot","doktype","mount_pid","mount_pid_ol","slug","title"
+# Site tree for first site: Uses the root pages from default tests setup
+# See: Ext:solr/Tests/Integration/Fixtures/sites_setup_and_data_set/01_integration_tree_one.csv
+,11,1,0,7,24,1,"/subpage","Subpage of first site"
+# Site tree for secod site: Uses the root pages from default tests setup
+# See: Ext:solr/Tests/Integration/Fixtures/sites_setup_and_data_set/02_integration_tree_two.csv
+,21,111,0,7,24,1,"/subpage","Subpage of second site"
+# detached and non Root Page-Tree
+,3,0,0,1,0,0,"/","Detached and non Root Page-Tree"
+,31,3,0,7,24,1,"/subpage-1","Subpage 1 of Detached"
+,32,3,0,7,24,1,"/subpage-2","Subpage 2 of Detached"
diff --git a/Tests/Integration/System/Solr/SolrConnectionTest.php b/Tests/Integration/System/Solr/SolrConnectionTest.php
index 30009e420c..f119dbdcbc 100644
--- a/Tests/Integration/System/Solr/SolrConnectionTest.php
+++ b/Tests/Integration/System/Solr/SolrConnectionTest.php
@@ -33,12 +33,29 @@ protected function setUp(): void
}
/**
+ * There is following scenario:
+ *
+ * [0]
+ * |
+ * ——[ 1] First site
+ * | |
+ * | ——[11] Subpage of first site
+ * |
+ * ——[111] Second site
+ * | |
+ * | ——[21] Subpage of second site
+ * |
+ * ——[ 3] Detached and non Root Page-Tree
+ * |
+ * —— [31] Subpage 1 of Detached
+ * |
+ * —— [32] Subpage 2 of Detached
+ *
* @param ?int $pageUid defaults to 1
- * @return SolrConnection|object
*/
- protected function canFindSolrConnectionByPageAndReturn(?int $pageUid = 1)
+ protected function canFindSolrConnectionByPageAndReturn(?int $pageUid = 1): SolrConnection
{
- $this->importDataSetFromFixture('SolrConnectionTest_slim_basic_sites.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/slim_basic_sites.csv');
/* @var ConnectionManager $connectionManager */
$connectionManager = GeneralUtility::makeInstance(ConnectionManager::class);
diff --git a/Tests/Integration/Task/EventQueueWorkerTaskTest.php b/Tests/Integration/Task/EventQueueWorkerTaskTest.php
index 2b6a3e3e31..e2da965634 100644
--- a/Tests/Integration/Task/EventQueueWorkerTaskTest.php
+++ b/Tests/Integration/Task/EventQueueWorkerTaskTest.php
@@ -32,9 +32,6 @@
*/
class EventQueueWorkerTaskTest extends IntegrationTest
{
- /**
- * @var array
- */
protected array $coreExtensionsToLoad = [
'extensionmanager',
'scheduler',
@@ -62,20 +59,12 @@ protected function setUp(): void
$extConf->set('solr', ['monitoringType' => 1]);
}
- protected function tearDown(): void
- {
- unset($this->indexQueue);
- unset($this->eventQueue);
- unset($GLOBALS['TYPO3_CONF_VARS']);
- parent::tearDown();
- }
-
/**
* @test
*/
public function canProcessEventQueueItems(): void
{
- $this->importDataSetFromFixture('can_process_event_queue.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/can_process_event_queue.csv');
$this->eventQueue->addEventToQueue(new RecordUpdatedEvent(1, 'tt_content'));
/** @var EventQueueWorkerTask $task */
@@ -94,7 +83,7 @@ public function canProcessEventQueueItems(): void
*/
public function canHandleErroneousEventQueueItems(): void
{
- $this->importDataSetFromFixture('can_handle_erroneous_event_queue_items.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/can_handle_erroneous_event_queue_items.csv');
/** @var EventQueueWorkerTask $task */
$task = GeneralUtility::makeInstance(EventQueueWorkerTask::class);
diff --git a/Tests/Integration/Task/Fixtures/can_handle_erroneous_event_queue_items.csv b/Tests/Integration/Task/Fixtures/can_handle_erroneous_event_queue_items.csv
new file mode 100644
index 0000000000..714d15d027
--- /dev/null
+++ b/Tests/Integration/Task/Fixtures/can_handle_erroneous_event_queue_items.csv
@@ -0,0 +1,7 @@
+"pages",
+,"uid","pid","doktype","hidden","slug","title"
+,10,1,1,0,"/childpage","Childpage"
+"tx_solr_eventqueue_item",
+,"uid","tstamp","event",,
+,1,1641888246,"O:8:"stdClass":0:{}",,
+
diff --git a/Tests/Integration/Task/Fixtures/can_handle_erroneous_event_queue_items.xml b/Tests/Integration/Task/Fixtures/can_handle_erroneous_event_queue_items.xml
deleted file mode 100644
index fc981b41a6..0000000000
--- a/Tests/Integration/Task/Fixtures/can_handle_erroneous_event_queue_items.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
- 10
- 1
- 1
- Childpage
-
-
- 1
- 1641888246
- O:8:"stdClass":0:{}
-
-
diff --git a/Tests/Integration/Task/Fixtures/can_process_event_queue.csv b/Tests/Integration/Task/Fixtures/can_process_event_queue.csv
new file mode 100644
index 0000000000..881fb5c803
--- /dev/null
+++ b/Tests/Integration/Task/Fixtures/can_process_event_queue.csv
@@ -0,0 +1,6 @@
+"pages",
+,"uid","pid","doktype","hidden","slug","title"
+,10,1,1,0,"/childpage","Childpage"
+"tt_content",
+,"uid","pid","CType","bodytext","colPos"
+,1,10,"text","Lorem ipsum dolor sit amet, consetetur sadipscing elitr.",0
diff --git a/Tests/Integration/Task/Fixtures/can_process_event_queue.xml b/Tests/Integration/Task/Fixtures/can_process_event_queue.xml
deleted file mode 100644
index de1aa0ad5c..0000000000
--- a/Tests/Integration/Task/Fixtures/can_process_event_queue.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
- 10
- 1
- 1
- Childpage
-
-
- 1
- 10
- text
- Lorem ipsum dolor sit amet, consetetur sadipscing elitr.
- 0
-
-
diff --git a/Tests/Integration/Task/Fixtures/can_reindex_task_fill_queue.csv b/Tests/Integration/Task/Fixtures/can_reindex_task_fill_queue.csv
new file mode 100644
index 0000000000..9391014c2b
--- /dev/null
+++ b/Tests/Integration/Task/Fixtures/can_reindex_task_fill_queue.csv
@@ -0,0 +1,47 @@
+"pages",
+,"uid","pid","is_siteroot","doktype","hidden","slug","title"
+,1,0,1,1,0,"/","Rootpage"
+,10,1,0,1,0,"/child-page","Childpage"
+"sys_template",
+,"uid","pid","root","clear","sorting","constants","config"
+,1,1,1,3,100,"","
+page = PAGE
+page.typeNum = 0
+
+plugin.tx_solr {
+ enabled = 1
+
+ index {
+ fieldProcessingInstructions {
+ changed = timestampToIsoDate
+ created = timestampToIsoDate
+ endtime = timestampToUtcIsoDate
+ rootline = pageUidToHierarchy
+ }
+
+ queue {
+ // mapping tableName.fields.SolrFieldName => TableFieldName (+ cObj processing)
+ pages = 1
+ pages {
+ initialization = ApacheSolrForTypo3\Solr\IndexQueue\Initializer\Page
+
+ // allowed page types (doktype) when indexing pages
+ allowedPageTypes = 1,7
+
+ indexingPriority = 0
+
+ indexer = ApacheSolrForTypo3\Solr\IndexQueue\PageIndexer
+ indexer {
+ // add options for the indexer here
+ }
+
+ // Only index standard pages and mount points that are not overlayed.
+ additionalWhereClause = (doktype = 1 OR (doktype=7 AND mount_pid_ol=0)) AND no_search = 0
+
+ fields {
+ sortSubTitle_stringS = subtitle
+ }
+ }
+ }
+ }
+}"
diff --git a/Tests/Integration/Task/Fixtures/can_reindex_task_fill_queue.xml b/Tests/Integration/Task/Fixtures/can_reindex_task_fill_queue.xml
deleted file mode 100644
index dc7a8b08b1..0000000000
--- a/Tests/Integration/Task/Fixtures/can_reindex_task_fill_queue.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-
-
-
-
-
- 1
- 1
- 1
- 3
-
-
-
- plugin.tx_solr {
-
- enabled = 1
-
- index {
- fieldProcessingInstructions {
- changed = timestampToIsoDate
- created = timestampToIsoDate
- endtime = timestampToUtcIsoDate
- rootline = pageUidToHierarchy
- }
-
- queue {
-
- // mapping tableName.fields.SolrFieldName => TableFieldName (+ cObj processing)
-
- pages = 1
- pages {
- initialization = ApacheSolrForTypo3\Solr\IndexQueue\Initializer\Page
-
- // allowed page types (doktype) when indexing records from table "pages"
- allowedPageTypes = 1,7
-
- indexingPriority = 0
-
- indexer = ApacheSolrForTypo3\Solr\IndexQueue\PageIndexer
- indexer {
- // add options for the indexer here
- }
-
- // Only index standard pages and mount points that are not overlayed.
- additionalWhereClause = (doktype = 1 OR (doktype=7 AND mount_pid_ol=0)) AND no_search = 0
-
- fields {
- sortSubTitle_stringS = subtitle
- }
- }
-
- }
- }
- }
- ]]>
-
- 100
-
-
- 1
- 1
- 1
- Rootpage
-
-
- 10
- 1
- 1
- Childpage
-
-
\ No newline at end of file
diff --git a/Tests/Integration/Task/Fixtures/can_trigger_frontend_calls_for_page_index.csv b/Tests/Integration/Task/Fixtures/can_trigger_frontend_calls_for_page_index.csv
new file mode 100644
index 0000000000..8b6886e1ac
--- /dev/null
+++ b/Tests/Integration/Task/Fixtures/can_trigger_frontend_calls_for_page_index.csv
@@ -0,0 +1,42 @@
+"pages",
+,"uid","is_siteroot","doktype","hidden","slug","title"
+,1,1,1,0,"/","page for testing"
+"tx_solr_indexqueue_item",
+,"uid","root","item_type","item_uid","indexing_configuration","has_indexing_properties","indexing_priority","changed","indexed","errors","pages_mountidentifier"
+,4711,1,"pages",1,"pages",0,0,1449151778,0,"",""
+"sys_template",
+,"uid","pid","root","clear","sorting","config"
+,1,1,1,3,100,"
+page = PAGE
+page.typeNum = 0
+
+plugin.tx_solr {
+ enabled = 1
+
+ index {
+ queue {
+ pages = 1
+ pages {
+ initialization = ApacheSolrForTypo3\Solr\IndexQueue\Initializer\Page
+
+ // allowed page types (doktype) when indexing pages
+ allowedPageTypes = 1,7
+
+ indexingPriority = 0
+
+ indexer = ApacheSolrForTypo3\Solr\IndexQueue\PageIndexer
+ indexer {
+ // add options for the indexer here
+ }
+
+ // Only index standard pages and mount points that are not overlayed.
+ additionalWhereClause = (doktype = 1 OR (doktype=7 AND mount_pid_ol=0)) AND no_search = 0
+
+ fields {
+ sortSubTitle_stringS = subtitle
+ }
+ }
+
+ }
+ }
+}"
diff --git a/Tests/Integration/Task/Fixtures/can_trigger_frontend_calls_for_page_index.xml b/Tests/Integration/Task/Fixtures/can_trigger_frontend_calls_for_page_index.xml
deleted file mode 100644
index c9fd6d40bb..0000000000
--- a/Tests/Integration/Task/Fixtures/can_trigger_frontend_calls_for_page_index.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
-
-
- 1
- 1
- 1
- 3
-
-
-
- plugin.tx_solr {
-
- enabled = 1
-
- index {
- queue {
- pages = 1
- pages {
- initialization = ApacheSolrForTypo3\Solr\IndexQueue\Initializer\Page
-
- // allowed page types (doktype) when indexing records from table "pages"
- allowedPageTypes = 1,7
-
- indexingPriority = 0
-
- indexer = ApacheSolrForTypo3\Solr\IndexQueue\PageIndexer
- indexer {
- // add options for the indexer here
- }
-
- // Only index standard pages and mount points that are not overlayed.
- additionalWhereClause = (doktype = 1 OR (doktype=7 AND mount_pid_ol=0)) AND no_search = 0
-
- fields {
- sortSubTitle_stringS = subtitle
- }
- }
-
- }
- }
- }
- ]]>
-
- 100
-
-
- 1
- 1
- 1
- page for testing
-
-
- 4711
- 1
- pages
- 1
- pages
- 0
- 0
- 1449151778
- 0
-
-
-
-
-
\ No newline at end of file
diff --git a/Tests/Integration/Task/IndexQueueWorkerTaskTest.php b/Tests/Integration/Task/IndexQueueWorkerTaskTest.php
index 758de607a2..bbccf8ded5 100644
--- a/Tests/Integration/Task/IndexQueueWorkerTaskTest.php
+++ b/Tests/Integration/Task/IndexQueueWorkerTaskTest.php
@@ -52,7 +52,7 @@ protected function setUp(): void
*/
public function canGetAdditionalInformationFromTask()
{
- $this->importDataSetFromFixture('can_trigger_frontend_calls_for_page_index.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/can_trigger_frontend_calls_for_page_index.csv');
$siteRepository = GeneralUtility::makeInstance(SiteRepository::class);
$site = $siteRepository->getFirstAvailableSite();
/* @var IndexQueueWorkerTask $indexQueueQueueWorkerTask */
diff --git a/Tests/Integration/Task/ReIndexTaskTest.php b/Tests/Integration/Task/ReIndexTaskTest.php
index baa402e82d..36f3815c12 100644
--- a/Tests/Integration/Task/ReIndexTaskTest.php
+++ b/Tests/Integration/Task/ReIndexTaskTest.php
@@ -23,6 +23,7 @@
use Exception;
use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
use TYPO3\CMS\Core\Cache\Exception\NoSuchCacheException;
+use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Localization\LanguageServiceFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility;
@@ -105,7 +106,7 @@ protected function assertIndexQueryContainsItemAmount($amount)
*/
public function testIfTheQueueIsFilledAfterTaskWasRunning()
{
- $this->importDataSetFromFixture('can_reindex_task_fill_queue.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/can_reindex_task_fill_queue.csv');
$this->assertEmptyIndexQueue();
$siteRepository = GeneralUtility::makeInstance(SiteRepository::class);
@@ -123,7 +124,7 @@ public function testIfTheQueueIsFilledAfterTaskWasRunning()
*/
public function testCanGetAdditionalInformationFromTask()
{
- $this->importDataSetFromFixture('can_reindex_task_fill_queue.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/can_reindex_task_fill_queue.csv');
$this->assertEmptyIndexQueue();
$siteRepository = GeneralUtility::makeInstance(SiteRepository::class);
@@ -142,7 +143,7 @@ public function testCanGetAdditionalInformationFromTask()
*/
public function solrIsEmptyAfterCleanup()
{
- $this->importDataSetFromFixture('can_reindex_task_fill_queue.xml');
+ $this->importCSVDataSet(__DIR__ . '/Fixtures/can_reindex_task_fill_queue.csv');
// fill the solr
$siteRepository = GeneralUtility::makeInstance(SiteRepository::class);