private function ReadonlyFieldWidgetTest::assertFieldWrapperContainsString in Read-only Field Widget 8
Check if the field widget wrapper contains the passed in string.
1 call to ReadonlyFieldWidgetTest::assertFieldWrapperContainsString()
- ReadonlyFieldWidgetTest::testFieldAccess in tests/
src/ Functional/ ReadonlyFieldWidgetTest.php - Test field access on readonly fields.
File
- tests/
src/ Functional/ ReadonlyFieldWidgetTest.php, line 236
Class
- ReadonlyFieldWidgetTest
- Tests Readonly Field Widget basic behaviour.
Namespace
Drupal\Tests\readonly_field_widget\FunctionalCode
private function assertFieldWrapperContainsString($string, NodeElement $element) {
$this
->assertTrue((bool) preg_match('/' . $string . '/', $element
->getHtml()), "field wrapper contains '" . $string . "'");
}