2 declare(strict_types = 1);
21 use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
44 'Test with one broken external link (not existing domain)' =>
46 __DIR__ .
'/Fixtures/input_content_with_broken_link_external.xml',
48 'EXT:linkvalidator/Tests/Functional/Fixtures/expected_output_content_with_broken_link_external.csv'
50 'Test with one broken external link in pages:canonical_link' =>
52 __DIR__ .
'/Fixtures/input_page_with_broken_link_external_in_canonical_link.xml',
54 'EXT:linkvalidator/Tests/Functional/Fixtures/expected_output_with_broken_link_external_in_canonical_link.csv'
56 'Test with one broken page link (not existing page)' =>
58 __DIR__ .
'/Fixtures/input_content_with_broken_link_page.xml',
60 'EXT:linkvalidator/Tests/Functional/Fixtures/expected_output_content_with_broken_link_page.csv'
62 'Test with one broken file link (not existing file)' =>
64 __DIR__ .
'/Fixtures/input_content_with_broken_link_file.xml',
66 'EXT:linkvalidator/Tests/Functional/Fixtures/expected_output_content_with_broken_link_file.csv'
68 'Test with several broken external, page and file links' =>
70 __DIR__ .
'/Fixtures/input_content_with_broken_links_several.xml',
72 'EXT:linkvalidator/Tests/Functional/Fixtures/expected_output_content_with_broken_links_several.csv'
74 'Test with several pages with broken external, page and file links' =>
76 __DIR__ .
'/Fixtures/input_content_with_broken_links_several_pages.xml',
78 'EXT:linkvalidator/Tests/Functional/Fixtures/expected_output_content_with_broken_links_several_pages.csv'
99 'pages' => [
'media',
'url',
'canonical_link'],
100 'tt_content' => [
'bodytext',
'header_link',
'records']
102 'linktypes' =>
'db,file,external,linkhandler',
103 'checkhidden' =>
'0',
105 'reportHiddenRecords' =>
'0'
109 $searchFields = $tsConfig[
'searchFields'];
111 $this->importDataSet($inputFile);
114 $linkAnalyzer->init($searchFields, $pidList, $tsConfig);
115 $linkAnalyzer->getLinkStatistics($config);
117 $this->assertCSVDataSet($expectedOutputFile);
124 'Test with one broken external link' =>
126 __DIR__ .
'/Fixtures/input_content_with_broken_link_external.xml',
128 'EXT:linkvalidator/Tests/Functional/Fixtures/expected_output_content_with_broken_link_none.csv'
130 'Test with one broken page link' =>
132 __DIR__ .
'/Fixtures/input_content_with_broken_link_page.xml',
134 'EXT:linkvalidator/Tests/Functional/Fixtures/expected_output_content_with_broken_link_none.csv'
136 'Test with one broken file link' =>
138 __DIR__ .
'/Fixtures/input_content_with_broken_link_file.xml',
140 'EXT:linkvalidator/Tests/Functional/Fixtures/expected_output_content_with_broken_link_file.csv'
161 'pages' => [
'media',
'url'],
162 'tt_content' => [
'bodytext',
'header_link',
'records']
164 'linktypes' =>
'file',
165 'checkhidden' =>
'0',
167 'reportHiddenRecords' =>
'0'
171 $searchFields = $tsConfig[
'searchFields'];
173 $this->importDataSet($inputFile);
176 $linkAnalyzer->init($searchFields, $pidList, $tsConfig);
177 $linkAnalyzer->getLinkStatistics($config);
179 $this->assertCSVDataSet($expectedOutputFile);
186 'Test with one broken external link' =>
188 __DIR__ .
'/Fixtures/input_content_with_broken_link_external.xml',
190 'EXT:linkvalidator/Tests/Functional/Fixtures/expected_output_content_with_broken_link_none.csv'
192 'Test with one broken page link' =>
194 __DIR__ .
'/Fixtures/input_content_with_broken_link_page.xml',
196 'EXT:linkvalidator/Tests/Functional/Fixtures/expected_output_content_with_broken_link_page.csv'
198 'Test with one broken file link' =>
200 __DIR__ .
'/Fixtures/input_content_with_broken_link_file.xml',
202 'EXT:linkvalidator/Tests/Functional/Fixtures/expected_output_content_with_broken_link_none.csv'
223 'pages' => [
'media',
'url'],
224 'tt_content' => [
'bodytext',
'header_link',
'records']
227 'checkhidden' =>
'0',
229 'reportHiddenRecords' =>
'0'
233 $searchFields = $tsConfig[
'searchFields'];
235 $this->importDataSet($inputFile);
238 $linkAnalyzer->init($searchFields, $pidList, $tsConfig);
239 $linkAnalyzer->getLinkStatistics($config);
241 $this->assertCSVDataSet($expectedOutputFile);
248 'Test with one broken external link' =>
250 __DIR__ .
'/Fixtures/input_content_with_broken_link_external.xml',
252 'EXT:linkvalidator/Tests/Functional/Fixtures/expected_output_content_with_broken_link_external.csv'
254 'Test with one broken page link' =>
256 __DIR__ .
'/Fixtures/input_content_with_broken_link_page.xml',
258 'EXT:linkvalidator/Tests/Functional/Fixtures/expected_output_content_with_broken_link_none.csv'
260 'Test with one broken file link' =>
262 __DIR__ .
'/Fixtures/input_content_with_broken_link_file.xml',
264 'EXT:linkvalidator/Tests/Functional/Fixtures/expected_output_content_with_broken_link_none.csv'
285 'tt_content' => [
'bodytext']
287 'linktypes' =>
'external',
288 'checkhidden' =>
'0',
290 'reportHiddenRecords' =>
'0'
294 $searchFields = $tsConfig[
'searchFields'];
296 $this->importDataSet($inputFile);
299 $linkAnalyzer->init($searchFields, $pidList, $tsConfig);
300 $linkAnalyzer->getLinkStatistics($config);
302 $this->assertCSVDataSet($expectedOutputFile);