‪TYPO3CMS  ‪main
IrreTutorialRecordsTest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
22 
24 {
25  protected array ‪$testExtensionsToLoad = [
26  'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_csv',
27  'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_mm',
28  'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_mnsymmetric',
29  'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_foreignfield',
30  'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_mnattributeinline',
31  'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_mnattributesimple',
32  ];
33 
37  public function ‪exportIrreRecords(): void
38  {
39  ‪$recordTypesIncludeFields = include __DIR__ . '/../Fixtures/IrreRecordsIncludeFields.php';
40 
41  $this->importCSVDataSet(__DIR__ . '/../Fixtures/DatabaseImports/irre_tutorial.csv');
42 
43  $subject = $this->getAccessibleMock(Export::class, ['setMetaData']);
44  $subject->setPid(1);
45  $subject->setTables(['_ALL']);
46  $subject->setRecordTypesIncludeFields(‪$recordTypesIncludeFields);
47  $subject->process();
48 
49  $out = $subject->render();
50 
51  // @todo Use self::assertXmlStringEqualsXmlFile() instead when sqlite issue is sorted out
53  __DIR__ . '/../Fixtures/XmlExports/irre-records.xml',
54  $out
55  );
56  }
57 }
‪TYPO3\CMS\Impexp\Export\$recordTypesIncludeFields
‪array $recordTypesIncludeFields
Definition: Export.php:122
‪TYPO3\CMS\Impexp\Tests\Functional\Export\IrreTutorialRecordsTest\$testExtensionsToLoad
‪array $testExtensionsToLoad
Definition: IrreTutorialRecordsTest.php:25
‪TYPO3\CMS\Impexp\Tests\Functional\Export\IrreTutorialRecordsTest\exportIrreRecords
‪exportIrreRecords()
Definition: IrreTutorialRecordsTest.php:37
‪TYPO3\CMS\Impexp\Tests\Functional\AbstractImportExportTestCase\assertXmlStringEqualsXmlFileWithIgnoredSqliteTypeInteger
‪assertXmlStringEqualsXmlFileWithIgnoredSqliteTypeInteger(string $expectedFile, string $actualXml)
Definition: AbstractImportExportTestCase.php:92
‪TYPO3\CMS\Impexp\Tests\Functional\Export
Definition: ExportPageTreeViewTest.php:18
‪TYPO3\CMS\Impexp\Tests\Functional\AbstractImportExportTestCase
Definition: AbstractImportExportTestCase.php:33
‪TYPO3\CMS\Impexp\Tests\Functional\Export\IrreTutorialRecordsTest
Definition: IrreTutorialRecordsTest.php:24
‪TYPO3\CMS\Impexp\Export
Definition: Export.php:51