function AssertLegacyTrait::assertLinkByHref
Same name in other branches
- 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.
File
-
core/
tests/ Drupal/ FunctionalTests/ AssertLegacyTrait.php, line 389
Class
- AssertLegacyTrait
- Provides convenience methods for assertions in browser tests.
Namespace
Drupal\FunctionalTestsCode
protected function assertLinkByHref($href, $index = 0) {
$this->assertSession()
->linkByHrefExists($href, $index);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.