‪TYPO3CMS  10.4
TemplateVisibleFieldsTest.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 ‪TemplateVisibleFieldsTest extends FunctionalTestCase
24 {
25  protected static ‪$templateFields = [
26  'hidden',
27  'title',
28  'sitetitle',
29  'constants',
30  'config',
31  'description',
32  'clear',
33  'root',
34  'includeStaticAfterBasedOn',
35  'include_static_file',
36  'basedOn',
37  'static_file_mode',
38  'starttime',
39  'endtime',
40  ];
41 
46  {
47  $this->setUpBackendUserFromFixture(1);
48  ‪$GLOBALS['LANG'] = GeneralUtility::makeInstance(LanguageService::class);
49 
50  $formEngineTestService = GeneralUtility::makeInstance(FormTestService::class);
51  $formResult = $formEngineTestService->createNewRecordForm('sys_template');
52 
53  foreach (static::$templateFields as $expectedField) {
54  self::assertNotFalse(
55  $formEngineTestService->formHtmlContainsField($expectedField, $formResult['html']),
56  'The field ' . $expectedField . ' is not in the form HTML'
57  );
58  }
59  }
60 }
‪TYPO3\CMS\Frontend\Tests\Functional\Tca\TemplateVisibleFieldsTest\$templateFields
‪static $templateFields
Definition: TemplateVisibleFieldsTest.php:25
‪TYPO3\CMS\Frontend\Tests\Functional\Tca
Definition: BackendLayoutVisibleFieldsTest.php:16
‪TYPO3\CMS\Frontend\Tests\Functional\Tca\TemplateVisibleFieldsTest
Definition: TemplateVisibleFieldsTest.php:24
‪TYPO3\CMS\Frontend\Tests\Functional\Tca\TemplateVisibleFieldsTest\templateFormContainsExpectedFields
‪templateFormContainsExpectedFields()
Definition: TemplateVisibleFieldsTest.php:45
‪$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