function MediaUiFunctionalTest::assertNoHelpLink

Same name in other branches
  1. 8.9.x core/modules/media/tests/src/Functional/MediaUiFunctionalTest.php \Drupal\Tests\media\Functional\MediaUiFunctionalTest::assertNoHelpLink()

Asserts that a given link is not present.

@internal

Parameters

\Behat\Mink\Element\NodeElement $element: The element to search.

string $text: The link text.

1 call to MediaUiFunctionalTest::assertNoHelpLink()
MediaUiFunctionalTest::testMediaReferenceWidget in core/modules/media/tests/src/Functional/MediaUiFunctionalTest.php
Tests the default autocomplete widgets for media reference fields.

File

core/modules/media/tests/src/Functional/MediaUiFunctionalTest.php, line 559

Class

MediaUiFunctionalTest
Ensures that media UI works correctly.

Namespace

Drupal\Tests\media\Functional

Code

protected function assertNoHelpLink(NodeElement $element, string $text) : void {
    $assert_session = $this->assertSession();
    // Assert that the link and its text are not present anywhere on the page.
    $assert_session->elementNotExists('named', [
        'link',
        $text,
    ], $element);
    $assert_session->pageTextNotContains($text);
}

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