diff --git a/core/modules/system/src/Tests/Form/ValidationTest.php b/core/modules/system/src/Tests/Form/ValidationTest.php
index 31db834..5540c72 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,11 @@ protected function assertErrorMessages($messages) {
       // Gather the element for checking the jump link section.
       $error_links[] = \Drupal::l($message['title'], Url::fromRoute('<none>', [], ['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))
-    ]);
-    $this->assertRaw($top_message);
-    $this->assertNoText(t('An illegal choice has been detected. Please contact the site administrator.'));
+    $this->assertRaw('1 error has been found:', $error_links);
+    $this->assertNoText('An illegal choice has been detected. Please contact the site administrator.');
+    foreach ($error_links as $link) {
+      $this->assertRaw($link);
+    }
   }
 
 }
