diff --git a/core/modules/filter/tests/src/Unit/FilterUninstallValidatorTest.php b/core/modules/filter/tests/src/Unit/FilterUninstallValidatorTest.php
index e9afa81..169554c 100644
--- a/core/modules/filter/tests/src/Unit/FilterUninstallValidatorTest.php
+++ b/core/modules/filter/tests/src/Unit/FilterUninstallValidatorTest.php
@@ -7,7 +7,7 @@
namespace Drupal\Tests\filter\Unit;
-use Drupal\Component\Utility\String;
+use Drupal\Component\Utility\SafeMarkup;
use Drupal\Tests\UnitTestCase;
/**
@@ -160,7 +160,7 @@ public function testValidateNoMatchingFormats() {
]);
$expected = [
- String::format('Provides a filter plugin that is in use in the following filter formats: %formats.', ['%formats' => implode(', ', [
+ SafeMarkup::format('Provides a filter plugin that is in use in the following filter formats: %formats.', ['%formats' => implode(', ', [
'Filter Format 1 Label',
'Filter Format 2 Label',
])]),
diff --git a/core/modules/forum/tests/src/Unit/ForumUninstallValidatorTest.php b/core/modules/forum/tests/src/Unit/ForumUninstallValidatorTest.php
index 16549c8..b9049c5 100644
--- a/core/modules/forum/tests/src/Unit/ForumUninstallValidatorTest.php
+++ b/core/modules/forum/tests/src/Unit/ForumUninstallValidatorTest.php
@@ -7,7 +7,7 @@
namespace Drupal\Tests\forum\Unit;
-use Drupal\Component\Utility\String;
+use Drupal\Component\Utility\SafeMarkup;
use Drupal\Tests\UnitTestCase;
/**
@@ -127,7 +127,7 @@ public function testValidateHasTermsForVocabularyWithNodesAccess() {
$module = 'forum';
$expected = [
'To uninstall Forum, first delete all Forum content.',
- String::format('To uninstall Forum, first delete all %vocabulary terms.', [
+ SafeMarkup::format('To uninstall Forum, first delete all %vocabulary terms.', [
'!url' => '/path/to/vocabulary/overview',
'%vocabulary' => 'Vocabulary label',
]),
@@ -164,7 +164,7 @@ public function testValidateHasTermsForVocabularyWithNodesNoAccess() {
$module = 'forum';
$expected = [
'To uninstall Forum, first delete all Forum content.',
- String::format('To uninstall Forum, first delete all %vocabulary terms.', [
+ SafeMarkup::format('To uninstall Forum, first delete all %vocabulary terms.', [
'%vocabulary' => 'Vocabulary label',
]),
];
@@ -200,7 +200,7 @@ public function testValidateHasTermsForVocabularyAccess() {
$module = 'forum';
$expected = [
- String::format('To uninstall Forum, first delete all %vocabulary terms.', [
+ SafeMarkup::format('To uninstall Forum, first delete all %vocabulary terms.', [
'!url' => '/path/to/vocabulary/overview',
'%vocabulary' => 'Vocabulary label',
]),
@@ -236,7 +236,7 @@ public function testValidateHasTermsForVocabularyNoAccess() {
$module = 'forum';
$expected = [
- String::format('To uninstall Forum, first delete all %vocabulary terms.', [
+ SafeMarkup::format('To uninstall Forum, first delete all %vocabulary terms.', [
'%vocabulary' => 'Vocabulary label',
]),
];
diff --git a/core/tests/Drupal/Tests/Core/Extension/RequiredModuleUninstallValidatorTest.php b/core/tests/Drupal/Tests/Core/Extension/RequiredModuleUninstallValidatorTest.php
index 6dba251..d55c141 100644
--- a/core/tests/Drupal/Tests/Core/Extension/RequiredModuleUninstallValidatorTest.php
+++ b/core/tests/Drupal/Tests/Core/Extension/RequiredModuleUninstallValidatorTest.php
@@ -7,7 +7,7 @@
namespace Drupal\Tests\Core\Extension;
-use Drupal\Component\Utility\String;
+use Drupal\Component\Utility\SafeMarkup;
use Drupal\Tests\UnitTestCase;
/**
@@ -72,7 +72,7 @@ public function testValidateRequired() {
->method('getModuleInfoByModule')
->willReturn(['required' => TRUE, 'name' => $module]);
- $expected = [String::format('The @module module is required.', ['@module' => $module])];
+ $expected = [SafeMarkup::format('The @module module is required.', ['@module' => $module])];
$reasons = $this->uninstallValidator->validate($module);
$this->assertSame($expected, $reasons);
}