TYPO3 CMS  TYPO3_8-7
ContentVisibleFieldsTest.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 
21 class ContentVisibleFieldsTest extends \TYPO3\TestingFramework\Core\Functional\FunctionalTestCase
22 {
26  protected $coreExtensionsToLoad = ['fluid_styled_content'];
27 
31  protected static $contentFields = [
32  'CType',
33  'colPos',
34  'sys_language_uid',
35  'header',
36  'header_layout',
37  'date',
38  'header_link',
39  'bodytext',
40  'assets',
41  'image_zoom',
42  'layout',
43  'imagewidth',
44  'imageheight',
45  'imageborder',
46  'imageorient',
47  'imagecols',
48  'sectionIndex',
49  'linkToTop',
50  'hidden',
51  'starttime',
52  'endtime',
53  'fe_group',
54  'editlock',
55  'rowDescription',
56  'categories',
57  ];
58 
63  {
64  $this->setUpBackendUserFromFixture(1);
65  $GLOBALS['LANG'] = GeneralUtility::makeInstance(LanguageService::class);
66 
67  $formEngineTestService = GeneralUtility::makeInstance(FormTestService::class);
68 
69  $formResult = $formEngineTestService->createNewRecordForm('tt_content', ['CType' => 'textmedia']);
70 
71  foreach (static::$contentFields as $expectedField) {
72  $this->assertNotFalse(
73  $formEngineTestService->formHtmlContainsField($expectedField, $formResult['html']),
74  'The field ' . $expectedField . ' is not in the form HTML'
75  );
76  }
77  }
78 }
static makeInstance($className,... $constructorArguments)
if(TYPO3_MODE==='BE') $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['frontendEditingController']['default']