public function ElementTest::testFormElementErrors in Drupal 9
Same name and namespace in other branches
- 8 core/modules/system/tests/src/Functional/Form/ElementTest.php \Drupal\Tests\system\Functional\Form\ElementTest::testFormElementErrors()
Tests form element error messages.
File
- core/
modules/ system/ tests/ src/ Functional/ Form/ ElementTest.php, line 191
Class
- ElementTest
- Tests building and processing of core form elements.
Namespace
Drupal\Tests\system\Functional\FormCode
public function testFormElementErrors() {
$this
->drupalGet('form_test/details-form');
$this
->submitForm([], 'Submit');
$this
->assertSession()
->pageTextContains('I am an error on the details element.');
}