diff --git a/core/tests/Drupal/Tests/WebAssert.php b/core/tests/Drupal/Tests/WebAssert.php index a6cb5b5e0ad399b0ba5c14b87178a5d2a55ee3f1..55ba465ddad7121aa3c4f023a846eb9859fb8e87 100644 --- a/core/tests/Drupal/Tests/WebAssert.php +++ b/core/tests/Drupal/Tests/WebAssert.php @@ -247,7 +247,7 @@ public function linkExists($label, $index = 0, $message = '') { * Thrown when element doesn't exist, or the link label is a different one. */ public function linkNotExists($label, $message = '') { - $message = ($message ? $message : strtr('Link with label %label found.', ['%label' => $label])); + $message = ($message ? $message : strtr('Link with label %label not found.', ['%label' => $label])); $links = $this->session->getPage()->findAll('named', ['link', $label]); $this->assert(empty($links), $message); } @@ -291,7 +291,7 @@ public function linkByHrefExists($href, $index = 0, $message = '') { */ public function linkByHrefNotExists($href, $message = '') { $xpath = $this->buildXPathQuery('//a[contains(@href, :href)]', [':href' => $href]); - $message = ($message ? $message : strtr('Link containing href %href found.', ['%href' => $href])); + $message = ($message ? $message : strtr('No link containing href %href found.', ['%href' => $href])); $links = $this->session->getPage()->findAll('xpath', $xpath); $this->assert(empty($links), $message); }