diff --git a/core/modules/system/src/Tests/Form/ValidationTest.php b/core/modules/system/src/Tests/Form/ValidationTest.php index 31db834..d2e31c9 100644 --- a/core/modules/system/src/Tests/Form/ValidationTest.php +++ b/core/modules/system/src/Tests/Form/ValidationTest.php @@ -7,7 +7,6 @@ namespace Drupal\system\Tests\Form; -use Drupal\Component\Utility\SafeMarkup; use Drupal\Core\Render\Element; use Drupal\Core\Url; use Drupal\simpletest\WebTestBase; @@ -292,11 +291,12 @@ protected function assertErrorMessages($messages) { // Gather the element for checking the jump link section. $error_links[] = \Drupal::l($message['title'], Url::fromRoute('', [], ['fragment' => 'edit-' . str_replace('_', '-', $message['key']), 'external' => TRUE])); } - $top_message = \Drupal::translation()->formatPlural(count($error_links), '1 error has been found: !errors', '@count errors have been found: !errors', [ - '!errors' => SafeMarkup::set(implode(', ', $error_links)) - ]); + $top_message = \Drupal::translation()->formatPlural(count($error_links), '1 error has been found:', '@count errors have been found:'); $this->assertRaw($top_message); - $this->assertNoText(t('An illegal choice has been detected. Please contact the site administrator.')); + $this->assertNoText('An illegal choice has been detected. Please contact the site administrator.'); + foreach ($error_links as $link) { + $this->assertRaw($link); + } } }