20 use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
64 $this->setUpBackendUserFromFixture(1);
65 $GLOBALS[
'LANG'] = GeneralUtility::makeInstance(LanguageService::class);
67 $formEngineTestService = GeneralUtility::makeInstance(FormTestService::class);
68 $formResult = $formEngineTestService->createNewRecordForm(
'be_users');
70 foreach (static::$backendUserFields as $expectedField) {
71 $this->assertNotFalse(
72 strpos($formResult[
'html'],
'[' . $expectedField .
']'),
73 'The field ' . $expectedField .
' is not in the HTML'
77 $this->assertNotFalse(
78 strpos($formResult[
'html'],
'Last login'),
79 'The field lastlogin is not in the HTML'
88 $this->setUpBackendUserFromFixture(1);
89 $GLOBALS[
'LANG'] = GeneralUtility::makeInstance(LanguageService::class);
91 $formEngineTestService = GeneralUtility::makeInstance(FormTestService::class);
92 $formResult = $formEngineTestService->createNewRecordForm(
'be_users', [
'admin' =>
true]);
94 $expectedFields = array_diff(static::$backendUserFields, static::$adminHiddenFields);
96 foreach ($expectedFields as $expectedField) {
97 $this->assertNotFalse(
98 $formEngineTestService->formHtmlContainsField($expectedField, $formResult[
'html']),
99 'The field ' . $expectedField .
' is not in the HTML'
103 foreach (static::$adminHiddenFields as $hiddenField) {
105 $formEngineTestService->formHtmlContainsField($hiddenField, $formResult[
'html']),
106 'The field ' . $hiddenField .
' is in the HTML'
110 $this->assertNotFalse(
111 strpos($formResult[
'html'],
'Last login'),
112 'The field lastlogin is not in the HTML'