function MediaUiFunctionalTest::assertNoHelpLink

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

Asserts that a given link is not present.

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 530

Class

MediaUiFunctionalTest
Ensures that media UI works correctly.

Namespace

Drupal\Tests\media\Functional

Code

protected function assertNoHelpLink(NodeElement $element, $text) {
    $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.