diff --git a/core/modules/basic_auth/src/Tests/Authentication/BasicAuthTest.php b/core/modules/basic_auth/src/Tests/Authentication/BasicAuthTest.php
index e548552..4f77ec5 100644
--- a/core/modules/basic_auth/src/Tests/Authentication/BasicAuthTest.php
+++ b/core/modules/basic_auth/src/Tests/Authentication/BasicAuthTest.php
@@ -54,7 +54,7 @@ public function testBasicAuth() {
     $this->curlClose();
 
     $this->drupalGet($url);
-    $this->assertEqual($this->drupalGetHeader('WWW-Authenticate'), SafeMarkup::format('Basic realm="@realm"', ['@realm' => \Drupal::config('system.site')->get('name')]));
+    $this->assertEqual($this->drupalGetHeader('WWW-Authenticate'), 'Basic realm="' . \Drupal::config('system.site')->get('name') . '"');
     $this->assertResponse('401', 'Not authenticated on the route that allows only basic_auth. Prompt to authenticate received.');
 
     $this->drupalGet('admin');
diff --git a/core/modules/block_content/src/Tests/BlockContentCreationTest.php b/core/modules/block_content/src/Tests/BlockContentCreationTest.php
index fdd1124..006ed35 100644
--- a/core/modules/block_content/src/Tests/BlockContentCreationTest.php
+++ b/core/modules/block_content/src/Tests/BlockContentCreationTest.php
@@ -59,10 +59,7 @@ public function testBlockContentCreation() {
     $this->drupalPostForm('block/add/basic', $edit, t('Save'));
 
     // Check that the Basic block has been created.
-    $this->assertRaw(format_string('@block %name has been created.', array(
-      '@block' => 'basic',
-      '%name' => $edit['info[0][value]']
-    )), 'Basic block created.');
+    $this->assertRaw('basic <em class="placeholder">' . $edit['info[0][value]'] . '</em> has been created.', 'Basic block created.');
 
     // Check that the view mode setting is hidden because only one exists.
     $this->assertNoFieldByXPath('//select[@name="settings[view_mode]"]', NULL, 'View mode setting hidden because only one exists');
@@ -77,9 +74,7 @@ public function testBlockContentCreation() {
     $this->drupalPostForm('block/add/basic', $edit, t('Save'));
 
     // Check that the Basic block has been created.
-    $this->assertRaw(format_string('A custom block with block description %value already exists.', array(
-      '%value' => $edit['info[0][value]']
-    )));
+    $this->assertRaw('A custom block with block description <em class="placeholder">' . $edit['info[0][value]'] .'</em> already exists.');
     $this->assertResponse(200);
   }
 
@@ -106,10 +101,7 @@ public function testBlockContentCreationMultipleViewModes() {
     $this->drupalPostForm('block/add/basic', $edit, t('Save'));
 
     // Check that the Basic block has been created.
-    $this->assertRaw(format_string('@block %name has been created.', array(
-      '@block' => 'basic',
-      '%name' => $edit['info[0][value]']
-    )), 'Basic block created.');
+    $this->assertRaw('basic <em class="placeholder">' . $edit['info[0][value]'] . '</em> has been created.', 'Basic block created.');
 
     // Save our block permanently
     $this->drupalPostForm(NULL, NULL, t('Save block'));
@@ -156,9 +148,7 @@ public function testBlockContentCreationMultipleViewModes() {
     $this->drupalPostForm('block/add/basic', $edit, t('Save'));
 
     // Check that the Basic block has been created.
-    $this->assertRaw(format_string('A custom block with block description %value already exists.', array(
-      '%value' => $edit['info[0][value]']
-    )));
+    $this->assertRaw('A custom block with block description <em class="placeholder">' . $edit['info[0][value]'] .'</em> already exists.');
     $this->assertResponse(200);
   }
 
@@ -176,10 +166,7 @@ public function testDefaultBlockContentCreation() {
     $this->drupalPostForm('block/add', $edit, t('Save'));
 
     // Check that the block has been created and that it is a basic block.
-    $this->assertRaw(format_string('@block %name has been created.', array(
-      '@block' => 'basic',
-      '%name' => $edit['info[0][value]'],
-    )), 'Basic block created.');
+    $this->assertRaw('basic <em class="placeholder">' . $edit['info[0][value]'] . '</em> has been created.', 'Basic block created.');
 
     // Check that the block exists in the database.
     $blocks = entity_load_multiple_by_properties('block_content', array('info' => $edit['info[0][value]']));
diff --git a/core/modules/block_content/src/Tests/BlockContentValidationTest.php b/core/modules/block_content/src/Tests/BlockContentValidationTest.php
index e38a37d..2dee571 100644
--- a/core/modules/block_content/src/Tests/BlockContentValidationTest.php
+++ b/core/modules/block_content/src/Tests/BlockContentValidationTest.php
@@ -37,9 +37,7 @@ public function testValidation() {
     // Make sure the violation is on the info property
     $this->assertEqual($violations[0]->getPropertyPath(), 'info');
     // Make sure the message is correct.
-    $this->assertEqual($violations[0]->getMessage(), format_string('A custom block with block description %value already exists.', [
-      '%value' => $block->label(),
-    ]));
+    $this->assertEqual($violations[0]->getMessage(), 'A custom block with block description <em class="placeholder">' . $block->label() . '</em> already exists.');
   }
 
 }
diff --git a/core/modules/block_content/src/Tests/PageEditTest.php b/core/modules/block_content/src/Tests/PageEditTest.php
index b5b6697..a8d709b 100644
--- a/core/modules/block_content/src/Tests/PageEditTest.php
+++ b/core/modules/block_content/src/Tests/PageEditTest.php
@@ -70,7 +70,7 @@ public function testPageEdit() {
     // Test deleting the block.
     $this->drupalGet("block/" . $revised_block->id());
     $this->clickLink(t('Delete'));
-    $this->assertText(format_string('Are you sure you want to delete the custom block @label?', array('@label' => $revised_block->label())));
+    $this->assertText("Are you sure you want to delete the custom block {$revised_block->label()}?");
   }
 
 }
diff --git a/core/modules/book/src/Tests/BookTest.php b/core/modules/book/src/Tests/BookTest.php
index 95b62e3..54cad1d 100644
--- a/core/modules/book/src/Tests/BookTest.php
+++ b/core/modules/book/src/Tests/BookTest.php
@@ -271,8 +271,9 @@ function checkBookNode(EntityInterface $node, $nodes, $previous = FALSE, $up = F
       /** @var \Drupal\Core\Url $url */
       $url = $previous->urlInfo();
       $url->setOptions(array('attributes' => array('rel' => array('prev'), 'title' => t('Go to previous page'))));
-      $text = SafeMarkup::format('<b>‹</b> @label', array('@label' => $previous->label()));
-      $this->assertRaw(\Drupal::l($text, $url), 'Previous page link found.');
+      $unrendered_text = ['#markup' => '<b>‹</b> ' . $previous->label()];
+      $rendered_text = \Drupal::service('renderer')->renderRoot($unrendered_text);
+      $this->assertRaw(\Drupal::l($rendered_text, $url), 'Previous page link found.');
     }
 
     if ($up) {
@@ -286,8 +287,9 @@ function checkBookNode(EntityInterface $node, $nodes, $previous = FALSE, $up = F
       /** @var \Drupal\Core\Url $url */
       $url = $next->urlInfo();
       $url->setOptions(array('attributes' => array('rel' => array('next'), 'title' => t('Go to next page'))));
-      $text = SafeMarkup::format('@label <b>›</b>', array('@label' => $next->label()));
-      $this->assertRaw(\Drupal::l($text, $url), 'Next page link found.');
+      $unrendered_text = ['#markup' => $next->label() . ' <b>›</b>'];
+      $rendered_text = \Drupal::service('renderer')->renderRoot($unrendered_text);
+      $this->assertRaw(\Drupal::l($rendered_text, $url), 'Next page link found.');
     }
 
     // Compute the expected breadcrumb.
diff --git a/core/modules/comment/src/Tests/CommentFieldAccessTest.php b/core/modules/comment/src/Tests/CommentFieldAccessTest.php
index e55dbfb..048ceda 100644
--- a/core/modules/comment/src/Tests/CommentFieldAccessTest.php
+++ b/core/modules/comment/src/Tests/CommentFieldAccessTest.php
@@ -213,17 +213,11 @@ public function testAccessToAdministrativeFields() {
       foreach ($permutations as $set) {
         $may_view = $set['comment']->{$field}->access('view', $set['user']);
         $may_update = $set['comment']->{$field}->access('edit', $set['user']);
-        $this->assertTrue($may_view, SafeMarkup::format('User @user can view field @field on comment @comment', [
-          '@user' => $set['user']->getUsername(),
-          '@comment' => $set['comment']->getSubject(),
-          '@field' => $field,
-        ]));
-        $this->assertEqual($may_update, $set['user']->hasPermission('administer comments'), SafeMarkup::format('User @user @state update field @field on comment @comment', [
-          '@user' => $set['user']->getUsername(),
-          '@state' => $may_update ? 'can' : 'cannot',
-          '@comment' => $set['comment']->getSubject(),
-          '@field' => $field,
-        ]));
+        $username = $set['user']->getUsername();
+        $state = $may_update ? 'can' : 'cannot';
+        $comment_subject = $set['comment']->getSubject();
+        $this->assertTrue($may_view, "User $username can view field $field on comment $comment_subject");
+        $this->assertEqual($may_update, $set['user']->hasPermission('administer comments'), "User $username $state update field $field on comment $comment_subject");
       }
     }
 
diff --git a/core/modules/config/src/Tests/ConfigImportRenameValidationTest.php b/core/modules/config/src/Tests/ConfigImportRenameValidationTest.php
index c461f30..866c298 100644
--- a/core/modules/config/src/Tests/ConfigImportRenameValidationTest.php
+++ b/core/modules/config/src/Tests/ConfigImportRenameValidationTest.php
@@ -110,7 +110,7 @@ public function testRenameValidation() {
     catch (ConfigImporterException $e) {
       $this->pass('Expected ConfigImporterException thrown when a renamed configuration entity does not match the existing entity type.');
       $expected = array(
-        SafeMarkup::format('Entity type mismatch on rename. @old_type not equal to @new_type for existing configuration @old_name and staged configuration @new_name.', array('@old_type' => 'node_type', '@new_type' => 'config_test', '@old_name' => 'node.type.' . $content_type->id(), '@new_name' => 'config_test.dynamic.' . $test_entity_id))
+        'Entity type mismatch on rename. node_type not equal to config_test for existing configuration node.type.' . $content_type->id() . ' and staged configuration config_test.dynamic.' . $test_entity_id . '.'
       );
       $this->assertEqual($expected, $this->configImporter->getErrors());
     }
@@ -153,7 +153,7 @@ public function testRenameSimpleConfigValidation() {
     catch (ConfigImporterException $e) {
       $this->pass('Expected ConfigImporterException thrown when simple configuration is renamed.');
       $expected = array(
-        SafeMarkup::format('Rename operation for simple configuration. Existing configuration @old_name and staged configuration @new_name.', array('@old_name' => 'config_test.old', '@new_name' => 'config_test.new'))
+        'Rename operation for simple configuration. Existing configuration config_test.old and staged configuration config_test.new.',
       );
       $this->assertEqual($expected, $this->configImporter->getErrors());
     }
diff --git a/core/modules/config/src/Tests/ConfigImportUITest.php b/core/modules/config/src/Tests/ConfigImportUITest.php
index 98f11c2..813354b 100644
--- a/core/modules/config/src/Tests/ConfigImportUITest.php
+++ b/core/modules/config/src/Tests/ConfigImportUITest.php
@@ -295,7 +295,7 @@ function testImportDiff() {
 
     // Load the diff UI and verify that the diff reflects the change.
     $this->drupalGet('admin/config/development/configuration/sync/diff/' . $config_name);
-    $this->assertTitle(format_string('View changes of @config_name | Drupal', array('@config_name' => $config_name)));
+    $this->assertTitle("View changes of $config_name | Drupal");
 
     // The following assertions do not use $this::assertEscaped() because
     // \Drupal\Component\Diff\DiffFormatter adds markup that signifies what has
@@ -436,7 +436,7 @@ function testImportErrorLog() {
 
     // Attempt to import configuration and verify that an error message appears.
     $this->drupalPostForm(NULL, array(), t('Import all'));
-    $this->assertText(SafeMarkup::format('Deleted and replaced configuration entity "@name"', array('@name' => $name_secondary)));
+    $this->assertText('Deleted and replaced configuration entity "' . @$name_secondary . '"');
     $this->assertText(t('The configuration was imported with errors.'));
     $this->assertNoText(t('The configuration was imported successfully.'));
     $this->assertText(t('There are no configuration changes to import.'));
@@ -456,11 +456,11 @@ public function testEntityBundleDelete() {
     $this->drupalGet('admin/config/development/configuration');
     // The node type, body field and entity displays will be scheduled for
     // removal.
-    $this->assertText(format_string('node.type.@type', array('@type' => $node_type->id())));
-    $this->assertText(format_string('field.field.node.@type.body', array('@type' => $node_type->id())));
-    $this->assertText(format_string('core.entity_view_display.node.@type.teaser', array('@type' => $node_type->id())));
-    $this->assertText(format_string('core.entity_view_display.node.@type.default', array('@type' => $node_type->id())));
-    $this->assertText(format_string('core.entity_form_display.node.@type.default', array('@type' => $node_type->id())));
+    $this->assertText("node.type.{$node_type->id()}");
+    $this->assertText("field.field.node.{$node_type->id()}.body");
+    $this->assertText("core.entity_view_display.node.{$node_type->id()}.teaser");
+    $this->assertText("core.entity_view_display.node.{$node_type->id()}.default");
+    $this->assertText("core.entity_form_display.node.{$node_type->id()}.default");
 
     // Attempt to import configuration and verify that an error message appears
     // and the node type, body field and entity displays are still scheduled for
@@ -468,22 +468,22 @@ public function testEntityBundleDelete() {
     $this->drupalPostForm(NULL, array(), t('Import all'));
     $validation_message = t('Entities exist of type %entity_type and %bundle_label %bundle. These entities need to be deleted before importing.', array('%entity_type' => $node->getEntityType()->getLabel(), '%bundle_label' => $node->getEntityType()->getBundleLabel(), '%bundle' => $node_type->label()));
     $this->assertRaw($validation_message);
-    $this->assertText(format_string('node.type.@type', array('@type' => $node_type->id())));
-    $this->assertText(format_string('field.field.node.@type.body', array('@type' => $node_type->id())));
-    $this->assertText(format_string('core.entity_view_display.node.@type.teaser', array('@type' => $node_type->id())));
-    $this->assertText(format_string('core.entity_view_display.node.@type.default', array('@type' => $node_type->id())));
-    $this->assertText(format_string('core.entity_form_display.node.@type.default', array('@type' => $node_type->id())));
+    $this->assertText("node.type.{$node_type->id()}");
+    $this->assertText("field.field.node.{$node_type->id()}.body");
+    $this->assertText("core.entity_view_display.node.{$node_type->id()}.teaser");
+    $this->assertText("core.entity_view_display.node.{$node_type->id()}.default");
+    $this->assertText("core.entity_form_display.node.{$node_type->id()}.default");
 
     // Delete the node and try to import again.
     $node->delete();
     $this->drupalPostForm(NULL, array(), t('Import all'));
     $this->assertNoRaw($validation_message);
     $this->assertText(t('There are no configuration changes to import.'));
-    $this->assertNoText(format_string('node.type.@type', array('@type' => $node_type->id())));
-    $this->assertNoText(format_string('field.field.node.@type.body', array('@type' => $node_type->id())));
-    $this->assertNoText(format_string('core.entity_view_display.node.@type.teaser', array('@type' => $node_type->id())));
-    $this->assertNoText(format_string('core.entity_view_display.node.@type.default', array('@type' => $node_type->id())));
-    $this->assertNoText(format_string('core.entity_form_display.node.@type.default', array('@type' => $node_type->id())));
+    $this->assertNoText("node.type.{$node_type->id()}");
+    $this->assertNoText("field.field.node.{$node_type->id()}.body");
+    $this->assertNoText("core.entity_view_display.node.{$node_type->id()}.teaser");
+    $this->assertNoText("core.entity_view_display.node.{$node_type->id()}.default");
+    $this->assertNoText("core.entity_form_display.node.{$node_type->id()}.default");
   }
 
   /**
diff --git a/core/modules/config/src/Tests/ConfigImporterTest.php b/core/modules/config/src/Tests/ConfigImporterTest.php
index 3fca8c0..8d511ea 100644
--- a/core/modules/config/src/Tests/ConfigImporterTest.php
+++ b/core/modules/config/src/Tests/ConfigImporterTest.php
@@ -250,7 +250,7 @@ function testSecondaryWritePrimaryFirst() {
 
     $logs = $this->configImporter->getErrors();
     $this->assertEqual(count($logs), 1);
-    $this->assertEqual($logs[0], SafeMarkup::format('Deleted and replaced configuration entity "@name"', array('@name' => $name_secondary)));
+    $this->assertEqual($logs[0], 'Deleted and replaced configuration entity "' . $name_secondary . '"');
   }
 
   /**
@@ -378,9 +378,8 @@ function testSecondaryUpdateDeletedDeleterFirst() {
 
     $logs = $this->configImporter->getErrors();
     $this->assertEqual(count($logs), 1);
-    $this->assertEqual($logs[0], SafeMarkup::format('Update target "@name" is missing.', array('@name' => $name_deletee)));
+    $this->assertEqual($logs[0], 'Update target "' . $name_deletee . '" is missing.');
   }
-
   /**
    * Tests that secondary updates for deleted files work as expected.
    *
diff --git a/core/modules/image/src/Tests/ImageFieldDisplayTest.php b/core/modules/image/src/Tests/ImageFieldDisplayTest.php
index 2ae0fa4..0bf80e8 100644
--- a/core/modules/image/src/Tests/ImageFieldDisplayTest.php
+++ b/core/modules/image/src/Tests/ImageFieldDisplayTest.php
@@ -309,7 +309,7 @@ function testImageFieldSettings() {
     $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save and keep published'));
     // Add the required alt text.
     $this->drupalPostForm(NULL, [$field_name . '[1][alt]' => $alt], t('Save and keep published'));
-    $this->assertText(format_string('Article @title has been updated.', array('@title' => $node->getTitle())));
+    $this->assertText("Article {$node->getTitle()} has been updated.");
 
     // Assert ImageWidget::process() calls FieldWidget::process().
     $this->drupalGet('node/' . $node->id() . '/edit');
diff --git a/core/modules/user/src/Tests/UserRegistrationTest.php b/core/modules/user/src/Tests/UserRegistrationTest.php
index 1e16bc7..815b95e 100644
--- a/core/modules/user/src/Tests/UserRegistrationTest.php
+++ b/core/modules/user/src/Tests/UserRegistrationTest.php
@@ -276,7 +276,7 @@ public function testUniqueFields() {
 
     $edit = ['mail' => 'test@example.com', 'name' => $account->getUsername()];
     $this->drupalPostForm('user/register', $edit, t('Create new account'));
-    $this->assertRaw(SafeMarkup::format('The username %value is already taken.', ['%value' => $account->getUsername()]));
+    $this->assertRaw('The username <em class="placeholder">' . $account->getUsername() . '</em> is already taken.');
 
     $edit = ['mail' => $account->getEmail(), 'name' => $this->randomString()];
     $this->drupalPostForm('user/register', $edit, t('Create new account'));
