protected function AssertLegacyTrait::assertNoLinkByHref in Drupal 9
Same name and namespace in other branches
- 8 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.
See also
https://www.drupal.org/node/3129738
1 call to AssertLegacyTrait::assertNoLinkByHref()
- AssertLegacyTraitTest::testAssertNoLinkByHref in core/
tests/ Drupal/ Tests/ Core/ Assert/ AssertLegacyTraitTest.php - @covers ::assertNoLinkByHref
File
- core/
tests/ Drupal/ FunctionalTests/ AssertLegacyTrait.php, line 496
Class
- AssertLegacyTrait
- Provides convenience methods for assertions in browser tests.
Namespace
Drupal\FunctionalTestsCode
protected function assertNoLinkByHref($href) {
@trigger_error('AssertLegacyTrait::assertNoLinkByHref() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->linkByHrefNotExists() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
$this
->assertSession()
->linkByHrefNotExists($href);
}