protected function LinkFieldUITest::getFieldHtml in Drupal 8
Same name and namespace in other branches
- 9 core/modules/link/tests/src/Functional/LinkFieldUITest.php \Drupal\Tests\link\Functional\LinkFieldUITest::getFieldHtml()
Returns the raw HTML for the given field.
Parameters
$field_name: The name of the field for which to return the HTML.
Return value
string The raw HTML.
2 calls to LinkFieldUITest::getFieldHtml()
- LinkFieldUITest::assertFieldContainsRawText in core/
modules/ link/ tests/ src/ Functional/ LinkFieldUITest.php - Checks that given field contains the given raw text.
- LinkFieldUITest::assertNoFieldContainsRawText in core/
modules/ link/ tests/ src/ Functional/ LinkFieldUITest.php - Checks that given field does not contain the given raw text.
File
- core/
modules/ link/ tests/ src/ Functional/ LinkFieldUITest.php, line 263
Class
- LinkFieldUITest
- Tests link field UI functionality.
Namespace
Drupal\Tests\link\FunctionalCode
protected function getFieldHtml($field_name) {
$css_id = Html::cleanCssIdentifier('edit-' . $field_name . '-wrapper');
return $this
->xpath('//*[@id=:id]', [
':id' => $css_id,
])[0]
->getHtml();
}