You are here

public function ElementTest::testFormElementErrors in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Form/ElementTest.php \Drupal\system\Tests\Form\ElementTest::testFormElementErrors()

Tests form element error messages.

File

core/modules/system/src/Tests/Form/ElementTest.php, line 172
Contains \Drupal\system\Tests\Form\ElementTest.

Class

ElementTest
Tests building and processing of core form elements.

Namespace

Drupal\system\Tests\Form

Code

public function testFormElementErrors() {
  $this
    ->drupalPostForm('form_test/details-form', [], 'Submit');
  $this
    ->assertText('I am an error on the details element.');
}