‪TYPO3CMS  9.5
BackendUtilityTest.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
20 use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
21 
25 class ‪BackendUtilityTest extends FunctionalTestCase
26 {
30  protected function ‪setUp()
31  {
32  parent::setUp();
33 
34  $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/pages.xml');
35  $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/backend/Tests/Functional/Utility/Fixtures/sys_domain.xml');
36  }
37 
42  {
43  $rootLineUtility = GeneralUtility::makeInstance(RootlineUtility::class, 4);
44  $rootLine = $rootLineUtility->get();
45  $this->assertEquals('example.com', ‪BackendUtility::firstDomainRecord($rootLine));
46  }
47 }
‪TYPO3\CMS\Core\Utility\RootlineUtility
Definition: RootlineUtility.php:36
‪TYPO3\CMS\Backend\Tests\Functional\Utility\BackendUtilityTest
Definition: BackendUtilityTest.php:26
‪TYPO3\CMS\Backend\Utility\BackendUtility\firstDomainRecord
‪static string null firstDomainRecord($rootLine)
Definition: BackendUtility.php:3623
‪TYPO3\CMS\Backend\Tests\Functional\Utility\BackendUtilityTest\setUp
‪setUp()
Definition: BackendUtilityTest.php:30
‪TYPO3\CMS\Backend\Tests\Functional\Utility
Definition: BackendUtilityTest.php:2
‪TYPO3\CMS\Backend\Utility\BackendUtility
Definition: BackendUtility.php:72
‪TYPO3\CMS\Backend\Tests\Functional\Utility\BackendUtilityTest\determineFirstDomainRecord
‪determineFirstDomainRecord()
Definition: BackendUtilityTest.php:41
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:45