‪TYPO3CMS  10.4
BackendLayoutVisibleFieldsTest.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 
21 use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
22 
23 class ‪BackendLayoutVisibleFieldsTest extends FunctionalTestCase
24 {
25  protected static ‪$backendLayoutFields = [
26  'title',
27  'icon',
28  'config',
29  'hidden',
30  'description',
31  ];
32 
37  {
38  $this->setUpBackendUserFromFixture(1);
39  ‪$GLOBALS['LANG'] = GeneralUtility::makeInstance(LanguageService::class);
40 
41  $formEngineTestService = GeneralUtility::makeInstance(FormTestService::class);
42  $formResult = $formEngineTestService->createNewRecordForm('backend_layout');
43 
44  foreach (static::$backendLayoutFields as $expectedField) {
45  self::assertNotFalse(
46  $formEngineTestService->formHtmlContainsField($expectedField, $formResult['html']),
47  'The field ' . $expectedField . ' is not in the form HTML'
48  );
49  }
50  }
51 }
‪TYPO3\CMS\Frontend\Tests\Functional\Tca\BackendLayoutVisibleFieldsTest
Definition: BackendLayoutVisibleFieldsTest.php:24
‪TYPO3\CMS\Frontend\Tests\Functional\Tca
Definition: BackendLayoutVisibleFieldsTest.php:16
‪TYPO3\CMS\Frontend\Tests\Functional\Tca\BackendLayoutVisibleFieldsTest\backendLayoutsFormContainsExpectedFields
‪backendLayoutsFormContainsExpectedFields()
Definition: BackendLayoutVisibleFieldsTest.php:36
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Backend\Tests\Functional\Form\FormTestService
Definition: FormTestService.php:27
‪TYPO3\CMS\Core\Localization\LanguageService
Definition: LanguageService.php:42
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:46
‪TYPO3\CMS\Frontend\Tests\Functional\Tca\BackendLayoutVisibleFieldsTest\$backendLayoutFields
‪static $backendLayoutFields
Definition: BackendLayoutVisibleFieldsTest.php:25