‪TYPO3CMS  10.4
FilemountsVisibleFieldsTest.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 ‪FilemountsVisibleFieldsTest extends FunctionalTestCase
24 {
25  protected static ‪$filemountsFields = [
26  'title',
27  'hidden',
28  'description',
29  'base',
30  'path',
31  'read_only',
32  ];
33 
38  {
39  $this->setUpBackendUserFromFixture(1);
40  ‪$GLOBALS['LANG'] = GeneralUtility::makeInstance(LanguageService::class);
41 
42  $formEngineTestService = GeneralUtility::makeInstance(FormTestService::class);
43  $formResult = $formEngineTestService->createNewRecordForm('sys_filemounts', ['base' => 1]);
44 
45  foreach (static::$filemountsFields as $expectedField) {
46  self::assertNotFalse(
47  $formEngineTestService->formHtmlContainsField($expectedField, $formResult['html']),
48  'The field ' . $expectedField . ' is not in the form HTML'
49  );
50  }
51  }
52 }
‪TYPO3\CMS\Core\Tests\Functional\Tca
Definition: BackendGroupsVisibleFieldsTest.php:16
‪TYPO3\CMS\Core\Tests\Functional\Tca\FilemountsVisibleFieldsTest\filemountsFormContainsExpectedFields
‪filemountsFormContainsExpectedFields()
Definition: FilemountsVisibleFieldsTest.php:37
‪TYPO3\CMS\Core\Tests\Functional\Tca\FilemountsVisibleFieldsTest\$filemountsFields
‪static $filemountsFields
Definition: FilemountsVisibleFieldsTest.php:25
‪TYPO3\CMS\Core\Tests\Functional\Tca\FilemountsVisibleFieldsTest
Definition: FilemountsVisibleFieldsTest.php:24
‪$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