You are here

protected function AssertLegacyTrait::assertLinkByHref in Drupal 8

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

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

Parameters

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

int $index: Link position counting from zero.

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

115 calls to AssertLegacyTrait::assertLinkByHref()
AdminTest::testAdminPages in core/modules/system/tests/src/Functional/System/AdminTest.php
Tests output on administrative listing pages.
BasicTest::testViewsWizardAndListing in core/modules/views/tests/src/Functional/Wizard/BasicTest.php
BlockContentListTest::testListing in core/modules/block_content/tests/src/Functional/BlockContentListTest.php
Tests the custom block listing page.
BlockContentListViewsTest::testListing in core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php
Tests the custom block listing page.
BlockContentTranslationUITest::doTestBasicTranslation in core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php
Tests the basic translation workflow.

... See full list

File

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

Class

AssertLegacyTrait
Provides convenience methods for assertions in browser tests.

Namespace

Drupal\FunctionalTests

Code

protected function assertLinkByHref($href, $index = 0) {
  $this
    ->assertSession()
    ->linkByHrefExists($href, $index);
}