protected function LinkFieldUITest::assertFieldContainsRawText in Drupal 9
Same name and namespace in other branches
- 8 core/modules/link/tests/src/Functional/LinkFieldUITest.php \Drupal\Tests\link\Functional\LinkFieldUITest::assertFieldContainsRawText()
Checks that given field contains the given raw text.
Parameters
string $field_name: The name of the field to check.
string $text: The text to check.
1 call to LinkFieldUITest::assertFieldContainsRawText()
- LinkFieldUITest::runFieldUIItem in core/
modules/ link/ tests/ src/ Functional/ LinkFieldUITest.php - Tests one link field UI item.
File
- core/
modules/ link/ tests/ src/ Functional/ LinkFieldUITest.php, line 222
Class
- LinkFieldUITest
- Tests link field UI functionality.
Namespace
Drupal\Tests\link\FunctionalCode
protected function assertFieldContainsRawText($field_name, $text) {
$this
->assertTrue((bool) preg_match('/' . preg_quote($text, '/') . '/ui', $this
->getFieldHtml($field_name)));
}