function ManageDisplayTest::assertNodeViewText

Same name in other branches
  1. 9 core/modules/field_ui/tests/src/Functional/ManageDisplayTest.php \Drupal\Tests\field_ui\Functional\ManageDisplayTest::assertNodeViewText()
  2. 8.9.x core/modules/field_ui/tests/src/Functional/ManageDisplayTest.php \Drupal\Tests\field_ui\Functional\ManageDisplayTest::assertNodeViewText()
  3. 11.x core/modules/field_ui/tests/src/Functional/ManageDisplayTest.php \Drupal\Tests\field_ui\Functional\ManageDisplayTest::assertNodeViewText()

Asserts that a string is found in the rendered node in a view mode.

@internal

Parameters

\Drupal\Core\Entity\EntityInterface $node: The node.

string $view_mode: The view mode in which the node should be displayed.

string $text: Plain text to look for.

string $message: Message to display.

1 call to ManageDisplayTest::assertNodeViewText()
ManageDisplayTest::testViewModeCustom in core/modules/field_ui/tests/src/Functional/ManageDisplayTest.php
Tests switching view modes to use custom or 'default' settings'.

File

core/modules/field_ui/tests/src/Functional/ManageDisplayTest.php, line 297

Class

ManageDisplayTest
Tests the Field UI "Manage display" and "Manage form display" screens.

Namespace

Drupal\Tests\field_ui\Functional

Code

public function assertNodeViewText(EntityInterface $node, string $view_mode, string $text, string $message) : void {
    $this->assertNodeViewTextHelper($node, $view_mode, $text, $message, FALSE);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.