function FormErrorHandlerFileUploadTest::testFileUploadErrors
Same name in other branches
- 8.9.x core/modules/inline_form_errors/tests/src/Functional/FormErrorHandlerFileUploadTest.php \Drupal\Tests\inline_form_errors\Functional\FormErrorHandlerFileUploadTest::testFileUploadErrors()
- 10 core/modules/inline_form_errors/tests/src/Functional/FormErrorHandlerFileUploadTest.php \Drupal\Tests\inline_form_errors\Functional\FormErrorHandlerFileUploadTest::testFileUploadErrors()
- 11.x core/modules/inline_form_errors/tests/src/Functional/FormErrorHandlerFileUploadTest.php \Drupal\Tests\inline_form_errors\Functional\FormErrorHandlerFileUploadTest::testFileUploadErrors()
Tests that the required field error is displayed as inline error message.
File
-
core/
modules/ inline_form_errors/ tests/ src/ Functional/ FormErrorHandlerFileUploadTest.php, line 92
Class
- FormErrorHandlerFileUploadTest
- Tests file upload scenario's with Inline Form Errors.
Namespace
Drupal\Tests\inline_form_errors\FunctionalCode
public function testFileUploadErrors() {
$this->drupalGet('node/add/page');
$edit = [
'edit-title-0-value' => $this->randomString(),
];
$this->submitForm($edit, 'Save');
$error_text = $this->getSession()
->getPage()
->find('css', '.field--name-field-ief-file .form-item--error-message')
->getText();
$this->assertEquals('field_ief_file field is required.', $error_text);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.