Commit ee6c2d59 authored by alexpott's avatar alexpott

Issue #2550965 by joelpittet, kgoel, stefan.r, josephdpurcell, akalata: Remove...

Issue #2550965 by joelpittet, kgoel, stefan.r, josephdpurcell, akalata: Remove SafeMarkup::set() in ValidationTest::assertErrorMessages()
parent bb2d2799
......@@ -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,9 @@ 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.'));
$top_message = \Drupal::translation()->formatPlural(count($error_links), '1 error has been found:', '@count errors have been found:');
$this->assertRaw($top_message . ' ' . implode(', ', $error_links));
$this->assertNoText('An illegal choice has been detected. Please contact the site administrator.');
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment