From fafa49b91302983af484c85457a30e8822293456 Mon Sep 17 00:00:00 2001 From: Nathaniel Catchpole <catch@35733.no-reply.drupal.org> Date: Thu, 23 Feb 2017 11:09:38 +0000 Subject: [PATCH] Issue #2854249 by GoZ, himanshu-dixit, boaloysius, xjm: Default message for linkNotExists and linkByHrefNotExists is wrong --- core/tests/Drupal/Tests/WebAssert.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/tests/Drupal/Tests/WebAssert.php b/core/tests/Drupal/Tests/WebAssert.php index a6cb5b5e0ad3..55ba465ddad7 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); } -- GitLab