diff --git a/core/modules/simpletest/src/AssertContentTrait.php b/core/modules/simpletest/src/AssertContentTrait.php
index c601943..336e2c1 100644
--- a/core/modules/simpletest/src/AssertContentTrait.php
+++ b/core/modules/simpletest/src/AssertContentTrait.php
@@ -10,6 +10,7 @@
 use Drupal\Component\Serialization\Json;
 use Drupal\Component\Utility\Html;
 use Drupal\Component\Utility\SafeMarkup;
+use Drupal\Component\Utility\SafeStringInterface;
 use Drupal\Component\Utility\Xss;
 use Drupal\Core\Render\RenderContext;
 use Symfony\Component\CssSelector\CssSelector;
@@ -178,6 +179,10 @@ protected function getUrl() {
   protected function buildXPathQuery($xpath, array $args = array()) {
     // Replace placeholders.
     foreach ($args as $placeholder => $value) {
+      // @todo fix this
+      if ($value instanceof SafeStringInterface) {
+        $value = (string) $value;
+      }
       // XPath 1.0 doesn't support a way to escape single or double quotes in a
       // string literal. We split double quotes out of the string, and encode
       // them separately.
@@ -299,6 +304,8 @@ protected function getAllOptions(\SimpleXMLElement $element) {
    *   TRUE if the assertion succeeded, FALSE otherwise.
    */
   protected function assertLink($label, $index = 0, $message = '', $group = 'Other') {
+    // @todo fix this in the test
+    $label = (string) $label;
     $links = $this->xpath('//a[normalize-space(text())=:label]', array(':label' => $label));
     $message = ($message ? $message : strtr('Link with label %label found.', array('%label' => $label)));
     return $this->assert(isset($links[$index]), $message, $group);
@@ -323,6 +330,11 @@ protected function assertLink($label, $index = 0, $message = '', $group = 'Other
    *   TRUE if the assertion succeeded, FALSE otherwise.
    */
   protected function assertNoLink($label, $message = '', $group = 'Other') {
+    // @todo fix this
+    if ($label instanceof SafeStringInterface) {
+      $label = (string) $label;
+    }
+
     $links = $this->xpath('//a[normalize-space(text())=:label]', array(':label' => $label));
     $message = ($message ? $message : SafeMarkup::format('Link with label %label not found.', array('%label' => $label)));
     return $this->assert(empty($links), $message, $group);
@@ -671,10 +683,15 @@ protected function assertNoUniqueText($text, $message = '', $group = 'Other') {
    *   TRUE on pass, FALSE on fail.
    */
   protected function assertUniqueTextHelper($text, $message = '', $group = 'Other', $be_unique = FALSE) {
+    // @todo fix this
+    if ($text instanceof SafeStringInterface) {
+      $text = (string) $text;
+    }
     if (!$message) {
       $message = '"' . $text . '"' . ($be_unique ? ' found only once' : ' found more than once');
     }
-    $first_occurrence = strpos($this->getTextContent(), $text);
+    // @todo fix this in the test itself
+    $first_occurrence = strpos((string) $this->getTextContent(), $text);
     if ($first_occurrence === FALSE) {
       return $this->assert(FALSE, $message, $group);
     }
@@ -1094,6 +1111,13 @@ protected function assertNoFieldByName($name, $value = '', $message = '', $group
    *   TRUE on pass, FALSE on fail.
    */
   protected function assertFieldById($id, $value = '', $message = '', $group = 'Browser') {
+    // @todo fix this
+    if ($value instanceof SafeStringInterface) {
+      $value = (string) $value;
+    }
+    if ($message instanceof SafeStringInterface) {
+      $message = (string) $message;
+    }
     return $this->assertFieldByXPath($this->constructFieldXpath('id', $id), $value, $message ? $message : SafeMarkup::format('Found field by id @id', array('@id' => $id)), $group);
   }
 
diff --git a/core/modules/simpletest/src/TestBase.php b/core/modules/simpletest/src/TestBase.php
index 1e59712..48c975a 100644
--- a/core/modules/simpletest/src/TestBase.php
+++ b/core/modules/simpletest/src/TestBase.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\simpletest;
 
+use Drupal\Component\Utility\SafeStringInterface;
 use Drupal\Component\Utility\Crypt;
 use Drupal\Component\Utility\Random;
 use Drupal\Component\Utility\SafeMarkup;
@@ -395,7 +396,7 @@ protected function assert($status, $message = '', $group = 'Other', array $calle
       'test_id' => $this->testId,
       'test_class' => get_class($this),
       'status' => $status,
-      'message' => $message,
+      'message' => (string) $message,
       'message_group' => $group,
       'function' => $caller['function'],
       'line' => $caller['line'],
@@ -654,6 +655,18 @@ protected function assertNotNull($value, $message = '', $group = 'Other') {
    *   TRUE if the assertion succeeded, FALSE otherwise.
    */
   protected function assertEqual($first, $second, $message = '', $group = 'Other') {
+    // @todo fix the actual tests
+    if ($first instanceof SafeStringInterface || $second instanceof SafeStringInterface) {
+      $first = (string) $first;
+      $second = (string) $second;
+    }
+    if (is_array($first)) {
+      array_walk_recursive($first, [$this, 'translationWrapperToString']);
+    }
+    if (is_array($second)) {
+      array_walk_recursive($second, [$this, 'translationWrapperToString']);
+    }
+
     return $this->assert($first == $second, $message ? $message : SafeMarkup::format('Value @first is equal to value @second.', array('@first' => var_export($first, TRUE), '@second' => var_export($second, TRUE))), $group);
   }
 
@@ -683,6 +696,15 @@ protected function assertNotEqual($first, $second, $message = '', $group = 'Othe
   }
 
   /**
+   * @todo remove this
+   */
+  public function translationWrapperToString(&$value) {
+    if ($value instanceof SafeStringInterface) {
+      $value = (string) $value;
+    }
+  }
+
+  /**
    * Check to see if two values are identical.
    *
    * @param $first
@@ -704,6 +726,17 @@ protected function assertNotEqual($first, $second, $message = '', $group = 'Othe
    *   TRUE if the assertion succeeded, FALSE otherwise.
    */
   protected function assertIdentical($first, $second, $message = '', $group = 'Other') {
+    // @todo fix the actual tests
+    if ($first instanceof SafeStringInterface || $second instanceof SafeStringInterface) {
+      $first = (string) $first;
+      $second = (string) $second;
+    }
+    if (is_array($first)) {
+      array_walk_recursive($first, [$this, 'translationWrapperToString']);
+    }
+    if (is_array($second)) {
+      array_walk_recursive($second, [$this, 'translationWrapperToString']);
+    }
     return $this->assert($first === $second, $message ? $message : SafeMarkup::format('Value @first is identical to value @second.', array('@first' => var_export($first, TRUE), '@second' => var_export($second, TRUE))), $group);
   }
 
diff --git a/core/modules/simpletest/src/WebTestBase.php b/core/modules/simpletest/src/WebTestBase.php
index 5e86826..82a8869 100644
--- a/core/modules/simpletest/src/WebTestBase.php
+++ b/core/modules/simpletest/src/WebTestBase.php
@@ -13,6 +13,7 @@
 use Drupal\Component\Serialization\Yaml;
 use Drupal\Component\Utility\Html;
 use Drupal\Component\Utility\NestedArray;
+use Drupal\Component\Utility\SafeStringInterface;
 use Drupal\Component\Utility\UrlHelper;
 use Drupal\Core\Cache\Cache;
 use Drupal\Component\Utility\SafeMarkup;
@@ -245,6 +246,9 @@ function drupalGetNodeByTitle($title, $reset = FALSE) {
     if ($reset) {
       \Drupal::entityManager()->getStorage('node')->resetCache();
     }
+    if ($title instanceof SafeStringInterface) {
+      $title = (string) $title;
+    }
     $nodes = entity_load_multiple_by_properties('node', array('title' => $title));
     // Load the first node returned from the database.
     $returned_node = reset($nodes);
@@ -1690,6 +1694,14 @@ protected function drupalGetXHR($path, array $options = array(), array $headers
    *   (e.g., "&extra_var1=hello+world&extra_var2=you%26me").
    */
   protected function drupalPostForm($path, $edit, $submit, array $options = array(), array $headers = array(), $form_html_id = NULL, $extra_post = NULL) {
+    // @todo fix this
+    if ($submit instanceof SafeStringInterface) {
+      $submit = (string) $submit;
+    }
+    if (is_array($edit)) {
+      array_walk_recursive($edit, [$this, 'translationWrapperToString']);
+    }
+
     $submit_matches = FALSE;
     $ajax = is_array($submit);
     if (isset($path)) {
@@ -2416,7 +2428,7 @@ protected function handleForm(&$post, &$edit, &$upload, $submit, $form) {
    *   Page contents on success, or FALSE on failure.
    */
   protected function clickLink($label, $index = 0) {
-    return $this->clickLinkHelper($label, $index, '//a[normalize-space()=:label]');
+    return $this->clickLinkHelper((string) $label, $index, '//a[normalize-space()=:label]');
   }
 
   /**
@@ -2436,7 +2448,7 @@ protected function clickLink($label, $index = 0) {
    * @see ::clickLink()
    */
   protected function clickLinkPartialName($label, $index = 0) {
-    return $this->clickLinkHelper($label, $index, '//a[starts-with(normalize-space(), :label)]');
+    return $this->clickLinkHelper((string) $label, $index, '//a[starts-with(normalize-space(), :label)]');
   }
 
   /**
@@ -2798,6 +2810,7 @@ protected function assertMail($name, $value = '', $message = '', $group = 'Email
   protected function assertMailString($field_name, $string, $email_depth, $message = '', $group = 'Other') {
     $mails = $this->drupalGetMails();
     $string_found = FALSE;
+    $string = (string) $string;
     for ($i = count($mails) -1; $i >= count($mails) - $email_depth && $i >= 0; $i--) {
       $mail = $mails[$i];
       // Normalize whitespace, as we don't know what the mail system might have
@@ -2986,4 +2999,10 @@ protected function assertNoCacheTag($cache_tag) {
     $this->assertFalse(in_array($cache_tag, $cache_tags), "'" . $cache_tag . "' is absent in the X-Drupal-Cache-Tags header.");
   }
 
+  // @todo remove this
+  public function translationWrapperToString(&$value) {
+    if ($value instanceof SafeStringInterface) {
+      $value = (string) $value;
+    }
+  }
 }
