You are here

protected function AssertLegacyTrait::assertNoLink in Drupal 9

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

Passes if a link with the specified label is not found.

Parameters

string|\Drupal\Component\Render\MarkupInterface $label: Text between the anchor tags.

Deprecated

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

See also

https://www.drupal.org/node/3129738

File

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

Class

AssertLegacyTrait
Provides convenience methods for assertions in browser tests.

Namespace

Drupal\FunctionalTests

Code

protected function assertNoLink($label) {
  @trigger_error('AssertLegacyTrait::assertNoLink() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->linkNotExists() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
  return $this
    ->assertSession()
    ->linkNotExists($label);
}