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