function AssertLegacyTrait::assertNoLinkByHref

Same name and namespace in other branches
  1. 9 core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php \Drupal\FunctionalTests\AssertLegacyTrait::assertNoLinkByHref()

Passes if a link containing a given href (part) is not found.

Parameters

string $href: The full or partial value of the 'href' attribute of the anchor tag.

Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->linkByHrefNotExists() instead.

3 calls to AssertLegacyTrait::assertNoLinkByHref()
AdminTest::testAdminPages in core/modules/system/tests/src/Functional/System/AdminTest.php
Tests output on administrative listing pages.
HandlerTest::testUICRUD in core/modules/views_ui/tests/src/Functional/HandlerTest.php
Tests UI CRUD.
NodeRevisionsUiTest::testNodeRevisionsTabWithDefaultRevision in core/modules/node/tests/src/Functional/NodeRevisionsUiTest.php
Checks the Revisions tab.

File

core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php, line 402

Class

AssertLegacyTrait
Provides convenience methods for assertions in browser tests.

Namespace

Drupal\FunctionalTests

Code

protected function assertNoLinkByHref($href) {
  $this->assertSession()
    ->linkByHrefNotExists($href);
}

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