protected function AssertLegacyTrait::assertLink in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php \Drupal\FunctionalTests\AssertLegacyTrait::assertLink()
Passes if a link with the specified label is found.
An optional link index may be passed.
Parameters
string|\Drupal\Component\Render\MarkupInterface $label: Text between the anchor tags.
int $index: Link position counting from zero.
Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->linkExists() instead.
1 call to AssertLegacyTrait::assertLink()
- UpdatePathRC1TestBaseFilledTest::testUpdatedSite in core/
modules/ system/ tests/ src/ Functional/ Update/ UpdatePathRC1TestBaseFilledTest.php - Tests that the content and configuration were properly updated.
File
- core/
tests/ Drupal/ FunctionalTests/ AssertLegacyTrait.php, line 361
Class
- AssertLegacyTrait
- Provides convenience methods for assertions in browser tests.
Namespace
Drupal\FunctionalTestsCode
protected function assertLink($label, $index = 0) {
return $this
->assertSession()
->linkExists($label, $index);
}