‪TYPO3CMS  9.5
WorkspaceVisibleFieldsTest.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 
22 class ‪WorkspaceVisibleFieldsTest extends FunctionalTestCase
23 {
27  protected ‪$coreExtensionsToLoad = ['workspaces'];
28 
32  protected static ‪$workspaceFields = [
33  'title',
34  'description',
35  'adminusers',
36  'members',
37  'stagechg_notification',
38  'edit_allow_notificaton_settings',
39  'edit_notification_preselection',
40  'edit_notification_defaults',
41  'publish_allow_notificaton_settings',
42  'publish_notification_preselection',
43  'publish_notification_defaults',
44  'execute_allow_notificaton_settings',
45  'execute_notification_preselection',
46  'execute_notification_defaults',
47  'db_mountpoints',
48  'file_mountpoints',
49  'publish_time',
50  'custom_stages',
51  'freeze',
52  'live_edit',
53  'swap_modes',
54  'publish_access',
55  ];
56 
60  protected function ‪setUp()
61  {
62  parent::setUp();
63 
64  $this->setUpBackendUserFromFixture(1);
65  ‪$GLOBALS['LANG'] = GeneralUtility::makeInstance(LanguageService::class);
66 
67  $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/workspaces/Tests/Functional/Fixtures/sys_filemounts.xml');
68  }
69 
74  {
75  $formEngineTestService = GeneralUtility::makeInstance(FormTestService::class);
76  $formResult = $formEngineTestService->createNewRecordForm('sys_workspace');
77 
78  foreach (static::$workspaceFields as $expectedField) {
79  $this->assertNotFalse(
80  $formEngineTestService->formHtmlContainsField($expectedField, $formResult['html']),
81  'The field ' . $expectedField . ' is not in the form HTML'
82  );
83  }
84  }
85 }
‪TYPO3\CMS\Workspaces\Tests\Functional\Tca\WorkspaceVisibleFieldsTest
Definition: WorkspaceVisibleFieldsTest.php:23
‪TYPO3\CMS\Workspaces\Tests\Functional\Tca\WorkspaceVisibleFieldsTest\setUp
‪setUp()
Definition: WorkspaceVisibleFieldsTest.php:58
‪TYPO3\CMS\Workspaces\Tests\Functional\Tca\WorkspaceVisibleFieldsTest\workspaceFormContainsExpectedFields
‪workspaceFormContainsExpectedFields()
Definition: WorkspaceVisibleFieldsTest.php:71
‪TYPO3\CMS\Workspaces\Tests\Functional\Tca\WorkspaceVisibleFieldsTest\$coreExtensionsToLoad
‪array $coreExtensionsToLoad
Definition: WorkspaceVisibleFieldsTest.php:26
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Backend\Tests\Functional\Form\FormTestService
Definition: FormTestService.php:26
‪TYPO3\CMS\Core\Localization\LanguageService
Definition: LanguageService.php:29
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:45
‪TYPO3\CMS\Workspaces\Tests\Functional\Tca
Definition: WorkspaceStageVisibleFieldsTest.php:2
‪TYPO3\CMS\Workspaces\Tests\Functional\Tca\WorkspaceVisibleFieldsTest\$workspaceFields
‪static array $workspaceFields
Definition: WorkspaceVisibleFieldsTest.php:30