diff --git a/core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php b/core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php
index 79653dab8c52c6b7b13cba0f5ce5335bf3b029a3..77971cb007c94c2716e2c33d4d12b18fd3fce9c8 100644
--- a/core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php
+++ b/core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php
@@ -380,7 +380,7 @@ protected function assertNoLink($label) {
    *   Link position counting from zero.
    *
    * @deprecated Scheduled for removal in Drupal 9.0.0.
-   *   Use $this->assertSession()->linkByHref() instead.
+   *   Use $this->assertSession()->linkByHrefExists() instead.
    */
   protected function assertLinkByHref($href, $index = 0) {
     $this->assertSession()->linkByHrefExists($href, $index);