‪TYPO3CMS  ‪main
DeleteTranslatedSubpagesTest.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;
24 use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
25 
29 final class ‪DeleteTranslatedSubpagesTest extends FunctionalTestCase
30 {
31  #[Test]
33  {
34  $this->importCSVDataSet(__DIR__ . '/DataSet/TranslatedSubpages.csv');
35  $this->importCSVDataSet(__DIR__ . '/../../Fixtures/be_users_admin.csv');
36  $backendUser = $this->setUpBackendUser(1);
37  ‪$GLOBALS['LANG'] = $this->get(LanguageServiceFactory::class)->createFromUserPreferences($backendUser);
38  $cmd['pages'][1]['delete'] = 1;
39  $dataHandler = GeneralUtility::makeInstance(DataHandler::class);
40  $dataHandler->start([], $cmd);
41  $dataHandler->process_cmdmap();
42  self::assertEquals([], $dataHandler->errorLog);
43  }
44 }
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\DeleteTranslatedSubpagesTest
Definition: DeleteTranslatedSubpagesTest.php:30
‪TYPO3\CMS\Core\Localization\LanguageServiceFactory
Definition: LanguageServiceFactory.php:25
‪TYPO3\CMS\Core\DataHandling\DataHandler
Definition: DataHandler.php:94
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler
Definition: CheckboxValidationTest.php:18
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\DeleteTranslatedSubpagesTest\deletePageCausesNoErrorsWithTranslatedSubpage
‪deletePageCausesNoErrorsWithTranslatedSubpage()
Definition: DeleteTranslatedSubpagesTest.php:32
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:52