You are here

protected function LinkFieldUITest::assertNoFieldContainsRawText in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/link/tests/src/Functional/LinkFieldUITest.php \Drupal\Tests\link\Functional\LinkFieldUITest::assertNoFieldContainsRawText()

Checks that given field does not contain 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::assertNoFieldContainsRawText()
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 250

Class

LinkFieldUITest
Tests link field UI functionality.

Namespace

Drupal\Tests\link\Functional

Code

protected function assertNoFieldContainsRawText($field_name, $text) {
  $this
    ->assertFalse((bool) preg_match('/' . preg_quote($text, '/') . '/ui', $this
    ->getFieldHtml($field_name)));
}