public function FormElementHelperTest::testGetElementTitle in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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 115 - Contains \Drupal\Tests\Core\Form\FormElementHelperTest.
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));
}