‪TYPO3CMS  ‪main
PagesAndTtContentTest.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 
24 
26 {
30  public function ‪importPagesAndRelatedTtContent(): void
31  {
32  $subject = GeneralUtility::makeInstance(Import::class);
33  $subject->setPid(0);
34 
35  $subject->loadFile(
36  'EXT:impexp/Tests/Functional/Fixtures/XmlImports/pages-and-ttcontent.xml',
37  true
38  );
39  $subject->importData();
40 
41  $this->testFilesToDelete[] = ‪Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image3.jpg';
42 
43  $this->assertCSVDataSet(__DIR__ . '/../Fixtures/DatabaseAssertions/importPagesAndRelatedTtContent.csv');
44 
45  self::assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image3.jpg', ‪Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image3.jpg');
46  self::assertFileEquals(__DIR__ . '/../Fixtures/Extensions/template_extension/Resources/Public/Templates/Empty.html', ‪Environment::getPublicPath() . '/typo3conf/ext/template_extension/Resources/Public/Templates/Empty.html');
47  }
48 }
‪TYPO3\CMS\Core\Core\Environment\getPublicPath
‪static getPublicPath()
Definition: Environment.php:187
‪TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentTest\importPagesAndRelatedTtContent
‪importPagesAndRelatedTtContent()
Definition: PagesAndTtContentTest.php:30
‪TYPO3\CMS\Impexp\Tests\Functional\Import
Definition: ImagesWithStoragesTest.php:18
‪TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentTest
Definition: PagesAndTtContentTest.php:26
‪TYPO3\CMS\Impexp\Import
Definition: Import.php:50
‪TYPO3\CMS\Impexp\Tests\Functional\AbstractImportExportTestCase
Definition: AbstractImportExportTestCase.php:33
‪TYPO3\CMS\Core\Core\Environment
Definition: Environment.php:41
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:51