function FormElementHelperTest::testGetElementTitle
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Core/Form/FormElementHelperTest.php \Drupal\Tests\Core\Form\FormElementHelperTest::testGetElementTitle()
- 10 core/tests/Drupal/Tests/Core/Form/FormElementHelperTest.php \Drupal\Tests\Core\Form\FormElementHelperTest::testGetElementTitle()
- 11.x core/tests/Drupal/Tests/Core/Form/FormElementHelperTest.php \Drupal\Tests\Core\Form\FormElementHelperTest::testGetElementTitle()
Tests the getElementTitle() method.
@covers ::getElementTitle
@dataProvider getElementTitleProvider
File
-
core/
tests/ Drupal/ Tests/ Core/ Form/ FormElementHelperTest.php, line 110
Class
- FormElementHelperTest
- Tests the form element helper.
Namespace
Drupal\Tests\Core\FormCode
public function testGetElementTitle($name, $form, $expected) {
$element = FormElementHelper::getElementByName($name, $form);
$this->assertSame($expected, FormElementHelper::getElementTitle($element));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.