function ConfigTargetTest::testTree
Same name in this branch
- 10 core/modules/system/tests/src/FunctionalJavascript/Form/ConfigTargetTest.php \Drupal\Tests\system\FunctionalJavascript\Form\ConfigTargetTest::testTree()
Same name in other branches
- 11.x core/modules/system/tests/src/FunctionalJavascript/Form/ConfigTargetTest.php \Drupal\Tests\system\FunctionalJavascript\Form\ConfigTargetTest::testTree()
- 11.x core/modules/system/tests/src/Functional/Form/ConfigTargetTest.php \Drupal\Tests\system\Functional\Form\ConfigTargetTest::testTree()
Tests #config_target where #tree is set to TRUE.
File
-
core/
modules/ system/ tests/ src/ Functional/ Form/ ConfigTargetTest.php, line 29
Class
- ConfigTargetTest
- Tests forms using #config_target.
Namespace
Drupal\Tests\system\Functional\FormCode
public function testTree() : void {
$this->drupalGet('/form-test/tree-config-target');
$page = $this->getSession()
->getPage();
$page->fillField('Favorite', '');
$page->pressButton('Save configuration');
$assert_session = $this->assertSession();
$assert_session->statusMessageContains('This value should not be blank.', 'error');
$assert_session->elementAttributeExists('named', [
'field',
'Favorite',
], 'aria-invalid');
$assert_session->elementAttributeNotExists('named', [
'field',
'Nemesis',
], 'aria-invalid');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.