‪TYPO3CMS  ‪main
IrreRecordsTest.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 
20 use PHPUnit\Framework\Attributes\Test;
23 
25 {
26  protected array ‪$testExtensionsToLoad = [
27  'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_csv',
28  'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_mm',
29  'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_mnsymmetric',
30  'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_foreignfield',
31  'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_mnattributeinline',
32  'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_mnattributesimple',
33  ];
34 
35  #[Test]
36  public function ‪exportIrreRecords(): void
37  {
38  ‪$recordTypesIncludeFields = include __DIR__ . '/../Fixtures/IrreRecordsIncludeFields.php';
39 
40  $this->importCSVDataSet(__DIR__ . '/../Fixtures/DatabaseImports/irre_records.csv');
41 
42  $subject = $this->getAccessibleMock(Export::class, ['setMetaData']);
43  $subject->setPid(1);
44  $subject->setTables(['_ALL']);
45  $subject->setRecordTypesIncludeFields(‪$recordTypesIncludeFields);
46  $subject->process();
47 
48  $out = $subject->render();
49 
50  // @todo Use self::assertXmlStringEqualsXmlFile() instead when sqlite issue is sorted out
52  __DIR__ . '/../Fixtures/XmlExports/irre-records.xml',
53  $out
54  );
55  }
56 }
‪TYPO3\CMS\Impexp\Export\$recordTypesIncludeFields
‪array $recordTypesIncludeFields
Definition: Export.php:87
‪TYPO3\CMS\Impexp\Tests\Functional\AbstractImportExportTestCase\assertXmlStringEqualsXmlFileWithIgnoredSqliteTypeInteger
‪assertXmlStringEqualsXmlFileWithIgnoredSqliteTypeInteger(string $expectedFile, string $actualXml)
Definition: AbstractImportExportTestCase.php:92
‪TYPO3\CMS\Impexp\Tests\Functional\Export\IrreRecordsTest\$testExtensionsToLoad
‪array $testExtensionsToLoad
Definition: IrreRecordsTest.php:26
‪TYPO3\CMS\Impexp\Tests\Functional\Export\IrreRecordsTest\exportIrreRecords
‪exportIrreRecords()
Definition: IrreRecordsTest.php:36
‪TYPO3\CMS\Impexp\Tests\Functional\Export
Definition: IrreRecordsTest.php:18
‪TYPO3\CMS\Impexp\Tests\Functional\AbstractImportExportTestCase
Definition: AbstractImportExportTestCase.php:33
‪TYPO3\CMS\Impexp\Tests\Functional\Export\IrreRecordsTest
Definition: IrreRecordsTest.php:25
‪TYPO3\CMS\Impexp\Export
Definition: Export.php:52