‪TYPO3CMS  10.4
PagesAndTtContentTest.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
22 
27 {
32  {
33  $subject = GeneralUtility::makeInstance(Import::class);
34  $subject->init();
35 
36  $subject->loadFile(
37  __DIR__ . '/../Fixtures/XmlImports/pages-and-ttcontent.xml',
38  1
39  );
40  $subject->importData(0);
41 
42  $this->testFilesToDelete[] = ‪Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image3.jpg';
43 
44  $this->assertCSVDataSet('EXT:impexp/Tests/Functional/Fixtures/DatabaseAssertions/importPagesAndRelatedTtContent.csv');
45 
46  self::assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image3.jpg', ‪Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image3.jpg');
47  self::assertFileEquals(__DIR__ . '/../Fixtures/Extensions/template_extension/Resources/Public/Templates/Empty.html', ‪Environment::getPublicPath() . '/typo3conf/ext/template_extension/Resources/Public/Templates/Empty.html');
48  }
49 }
‪TYPO3\CMS\Core\Core\Environment\getPublicPath
‪static string getPublicPath()
Definition: Environment.php:180
‪TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentTest\importPagesAndRelatedTtContent
‪importPagesAndRelatedTtContent()
Definition: PagesAndTtContentTest.php:31
‪TYPO3\CMS\Impexp\Tests\Functional\Import
Definition: IrreTutorialRecordsTest.php:16
‪TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentTest
Definition: PagesAndTtContentTest.php:27
‪TYPO3\CMS\Impexp\Import
Definition: Import.php:42
‪TYPO3\CMS\Impexp\Tests\Functional\AbstractImportExportTestCase
Definition: AbstractImportExportTestCase.php:31
‪TYPO3\CMS\Core\Core\Environment
Definition: Environment.php:40
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:46