diff --git a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
index 916cb0d..a31652e 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
@@ -238,9 +238,9 @@ public static function insertAssert($test_id, $test_class, $status, $message = '
     }
 
     $caller += array(
-      'function' => t('Unknown'),
+      'function' => 'Unknown',
       'line' => 0,
-      'file' => t('Unknown'),
+      'file' => 'Unknown',
     );
 
     $assertion = array(
@@ -318,6 +318,32 @@ protected function getAssertionCall() {
   }
 
   /**
+   * Formats an assertion message.
+   *
+   * @param string $message
+   *   The assertion message, optionally containing string placeholders; e.g.,
+   *   '@first', '@second', '@value'.
+   * @param array $args
+   *   An associative array of replacement token mappings to pass to
+   *   format_string(). Unused tokens are filtered out before format_string() is
+   *   invoked. Replacement values of used tokens are dumped into strings via
+   *   var_export().
+   *
+   * @return string
+   *   The formatted assertion message string.
+   */
+  protected function formatString($message, array $args) {
+    foreach ($args as $token => $value) {
+      if (strpos($message, $token) === FALSE) {
+        unset($args[$token]);
+        continue;
+      }
+      $args[$token] = var_export($value, TRUE);
+    }
+    return format_string($message, $args);
+  }
+
+  /**
    * Check to see if a value is not false (not an empty string, 0, NULL, or FALSE).
    *
    * @param $value
@@ -330,7 +356,12 @@ protected function getAssertionCall() {
    *   TRUE if the assertion succeeded, FALSE otherwise.
    */
   protected function assertTrue($value, $message = '', $group = 'Other') {
-    return $this->assert((bool) $value, $message ? $message : t('Value @value is TRUE.', array('@value' => var_export($value, TRUE))), $group);
+    if (!isset($message)) {
+      $message = 'Value @value is TRUE.';
+    }
+    return $this->assert((bool) $value, $this->formatString($message, array(
+      '@value' => $value,
+    )), $group);
   }
 
   /**
@@ -346,7 +377,12 @@ protected function assertTrue($value, $message = '', $group = 'Other') {
    *   TRUE if the assertion succeeded, FALSE otherwise.
    */
   protected function assertFalse($value, $message = '', $group = 'Other') {
-    return $this->assert(!$value, $message ? $message : t('Value @value is FALSE.', array('@value' => var_export($value, TRUE))), $group);
+    if (!isset($message)) {
+      $message = 'Value @value is FALSE.';
+    }
+    return $this->assert(!$value, $this->formatString($message, array(
+      '@value' => $value,
+    )), $group);
   }
 
   /**
@@ -362,7 +398,12 @@ protected function assertFalse($value, $message = '', $group = 'Other') {
    *   TRUE if the assertion succeeded, FALSE otherwise.
    */
   protected function assertNull($value, $message = '', $group = 'Other') {
-    return $this->assert(!isset($value), $message ? $message : t('Value @value is NULL.', array('@value' => var_export($value, TRUE))), $group);
+    if (!isset($message)) {
+      $message = 'Value @value is NULL.';
+    }
+    return $this->assert(!isset($value), $this->formatString($message, array(
+      '@value' => $value,
+    )), $group);
   }
 
   /**
@@ -378,7 +419,12 @@ protected function assertNull($value, $message = '', $group = 'Other') {
    *   TRUE if the assertion succeeded, FALSE otherwise.
    */
   protected function assertNotNull($value, $message = '', $group = 'Other') {
-    return $this->assert(isset($value), $message ? $message : t('Value @value is not NULL.', array('@value' => var_export($value, TRUE))), $group);
+    if (!isset($message)) {
+      $message = 'Value @value is not NULL.';
+    }
+    return $this->assert(isset($value), $this->formatString($message, array(
+      '@value' => $value,
+    )), $group);
   }
 
   /**
@@ -396,7 +442,13 @@ protected function assertNotNull($value, $message = '', $group = 'Other') {
    *   TRUE if the assertion succeeded, FALSE otherwise.
    */
   protected function assertEqual($first, $second, $message = '', $group = 'Other') {
-    return $this->assert($first == $second, $message ? $message : t('Value @first is equal to value @second.', array('@first' => var_export($first, TRUE), '@second' => var_export($second, TRUE))), $group);
+    if (!isset($message)) {
+      $message = 'Value @first is equal to value @second.';
+    }
+    return $this->assert($first == $second, $this->formatString($message, array(
+      '@first' => $first,
+      '@second' => $second,
+    )), $group);
   }
 
   /**
@@ -414,7 +466,13 @@ protected function assertEqual($first, $second, $message = '', $group = 'Other')
    *   TRUE if the assertion succeeded, FALSE otherwise.
    */
   protected function assertNotEqual($first, $second, $message = '', $group = 'Other') {
-    return $this->assert($first != $second, $message ? $message : t('Value @first is not equal to value @second.', array('@first' => var_export($first, TRUE), '@second' => var_export($second, TRUE))), $group);
+    if (!isset($message)) {
+      $message = 'Value @first is not equal to value @second.';
+    }
+    return $this->assert($first != $second, $this->formatString($message, array(
+      '@first' => $first,
+      '@second' => $second,
+    )), $group);
   }
 
   /**
@@ -432,7 +490,13 @@ protected function assertNotEqual($first, $second, $message = '', $group = 'Othe
    *   TRUE if the assertion succeeded, FALSE otherwise.
    */
   protected function assertIdentical($first, $second, $message = '', $group = 'Other') {
-    return $this->assert($first === $second, $message ? $message : t('Value @first is identical to value @second.', array('@first' => var_export($first, TRUE), '@second' => var_export($second, TRUE))), $group);
+    if (!isset($message)) {
+      $message = 'Value @first is identical to value @second.';
+    }
+    return $this->assert($first === $second, $this->formatString($message, array(
+      '@first' => $first,
+      '@second' => $second,
+    )), $group);
   }
 
   /**
@@ -450,7 +514,13 @@ protected function assertIdentical($first, $second, $message = '', $group = 'Oth
    *   TRUE if the assertion succeeded, FALSE otherwise.
    */
   protected function assertNotIdentical($first, $second, $message = '', $group = 'Other') {
-    return $this->assert($first !== $second, $message ? $message : t('Value @first is not identical to value @second.', array('@first' => var_export($first, TRUE), '@second' => var_export($second, TRUE))), $group);
+    if (!isset($message)) {
+      $message = 'Value @first is not identical to value @second.';
+    }
+    return $this->assert($first !== $second, $this->formatString($message, array(
+      '@first' => $first,
+      '@second' => $second,
+    )), $group);
   }
 
   /**
@@ -555,7 +625,7 @@ protected function verbose($message) {
       $url = $this->verboseDirectoryUrl . '/' . $this->verboseClassName . '-' . $this->verboseId . '.html';
       // Not using l() to avoid invoking the theme system, so that unit tests
       // can use verbose() as well.
-      $url = '<a href="' . $url . '" target="_blank">' . t('Verbose message') . '</a>';
+      $url = '<a href="' . $url . '" target="_blank">Verbose message</a>';
       $this->error($url, 'User notice');
     }
     $this->verboseId++;
@@ -625,7 +695,7 @@ public function run(array $methods = array()) {
             'line' => $method_info->getStartLine(),
             'function' => $class . '->' . $method . '()',
           );
-          $completion_check_id = TestBase::insertAssert($this->testId, $class, FALSE, t('The test did not complete due to a fatal error.'), 'Completion check', $caller);
+          $completion_check_id = TestBase::insertAssert($this->testId, $class, FALSE, 'The test did not complete due to a fatal error.', 'Completion check', $caller);
           $this->setUp();
           if ($this->setup) {
             try {
@@ -638,7 +708,7 @@ public function run(array $methods = array()) {
             $this->tearDown();
           }
           else {
-            $this->fail(t("The test cannot be executed because it has not been set up properly."));
+            $this->fail('The test cannot be executed because it has not been set up properly.');
           }
           // Remove the completion check record.
           TestBase::deleteAssert($completion_check_id);
@@ -902,7 +972,7 @@ protected function tearDown() {
     $emailCount = count(variable_get('drupal_test_email_collector', array()));
     if ($emailCount) {
       $message = format_plural($emailCount, '1 e-mail was sent during this test.', '@count e-mails were sent during this test.');
-      $this->pass($message, t('E-mail'));
+      $this->pass($message, 'E-mail');
     }
 
     // Delete temporary files directory.
@@ -995,7 +1065,7 @@ protected function exceptionHandler($exception) {
     ));
     require_once DRUPAL_ROOT . '/core/includes/errors.inc';
     // The exception message is run through check_plain() by _drupal_decode_exception().
-    $this->error(t('%type: !message in %function (line %line of %file).', _drupal_decode_exception($exception)), 'Uncaught exception', _drupal_get_last_caller($backtrace));
+    $this->error($this->formatString('%type: !message in %function (line %line of %file).', _drupal_decode_exception($exception)), 'Uncaught exception', _drupal_get_last_caller($backtrace));
   }
 
   /**
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
index ec800d4..3646b6a 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
@@ -291,7 +291,7 @@ protected function drupalCreateContentType($settings = array()) {
     menu_router_rebuild();
     node_add_body_field($type);
 
-    $this->assertEqual($saved_type, SAVED_NEW, t('Created content type %type.', array('%type' => $type->type)));
+    $this->assertEqual($saved_type, SAVED_NEW, $this->formatString('Created content type %type.', array('%type' => $type->type)));
 
     // Reset permissions so that permissions for this content type are available.
     $this->checkPermissions(array(), TRUE);
@@ -403,7 +403,7 @@ protected function drupalCreateUser(array $permissions = array()) {
     $account = entity_create('user', $edit);
     $account->save();
 
-    $this->assertTrue(!empty($account->uid), t('User created with name %name and pass %pass', array('%name' => $edit['name'], '%pass' => $edit['pass'])), t('User login'));
+    $this->assertTrue(!empty($account->uid), $this->formatString('User created with name %name and pass %pass', array('%name' => $edit['name'], '%pass' => $edit['pass'])), 'User login');
     if (empty($account->uid)) {
       return FALSE;
     }
@@ -447,10 +447,10 @@ protected function drupalCreateRole(array $permissions, $rid = NULL, $name = NUL
     $role->name = $name;
     $result = user_role_save($role);
 
-    $this->assertIdentical($result, SAVED_NEW, t('Created role ID @rid with name @name.', array(
+    $this->assertIdentical($result, SAVED_NEW, $this->formatString('Created role ID @rid with name @name.', array(
       '@name' => var_export($role->name, TRUE),
       '@rid' => var_export($role->rid, TRUE),
-    )), t('Role'));
+    )), 'Role');
 
     if ($result === SAVED_NEW) {
       // Grant the specified permissions to the role, if any.
@@ -460,10 +460,10 @@ protected function drupalCreateRole(array $permissions, $rid = NULL, $name = NUL
         $assigned_permissions = db_query('SELECT permission FROM {role_permission} WHERE rid = :rid', array(':rid' => $role->rid))->fetchCol();
         $missing_permissions = array_diff($permissions, $assigned_permissions);
         if (!$missing_permissions) {
-          $this->pass(t('Created permissions: @perms', array('@perms' => implode(', ', $permissions))), t('Role'));
+          $this->pass($this->formatString('Created permissions: @perms', array('@perms' => implode(', ', $permissions))), 'Role');
         }
         else {
-          $this->fail(t('Failed to create permissions: @perms', array('@perms' => implode(', ', $missing_permissions))), t('Role'));
+          $this->fail($this->formatString('Failed to create permissions: @perms', array('@perms' => implode(', ', $missing_permissions))), 'Role');
         }
       }
       return $role->rid;
@@ -493,7 +493,7 @@ protected function checkPermissions(array $permissions, $reset = FALSE) {
     $valid = TRUE;
     foreach ($permissions as $permission) {
       if (!in_array($permission, $available)) {
-        $this->fail(t('Invalid permission %permission.', array('%permission' => $permission)), t('Role'));
+        $this->fail($this->formatString('Invalid permission %permission.', array('%permission' => $permission)), 'Role');
         $valid = FALSE;
       }
     }
@@ -540,7 +540,7 @@ protected function drupalLogin($user) {
 
     // If a "log out" link appears on the page, it is almost certainly because
     // the login was successful.
-    $pass = $this->assertLink(t('Log out'), 0, t('User %name successfully logged in.', array('%name' => $user->name)), t('User login'));
+    $pass = $this->assertLink(t('Log out'), 0, $this->formatString('User %name successfully logged in.', array('%name' => $user->name)), 'User login');
 
     if ($pass) {
       $this->loggedInUser = $user;
@@ -563,9 +563,9 @@ protected function drupalLogout() {
     // idea being if you were properly logged out you should be seeing a login
     // screen.
     $this->drupalGet('user/logout', array('query' => array('destination' => 'user')));
-    $this->assertResponse(200, t('User was logged out.'));
-    $pass = $this->assertField('name', t('Username field found.'), t('Logout'));
-    $pass = $pass && $this->assertField('pass', t('Password field found.'), t('Logout'));
+    $this->assertResponse(200, 'User was logged out.');
+    $pass = $this->assertField('name', 'Username field found.', 'Logout');
+    $pass = $pass && $this->assertField('pass', 'Password field found.', 'Logout');
 
     if ($pass) {
       $this->loggedInUser = FALSE;
@@ -718,7 +718,7 @@ protected function setUp() {
     }
     if ($modules) {
       $success = module_enable($modules, TRUE);
-      $this->assertTrue($success, t('Enabled modules: %modules', array('%modules' => implode(', ', $modules))));
+      $this->assertTrue($success, $this->formatString('Enabled modules: %modules', array('%modules' => implode(', ', $modules))));
       $this->rebuildContainer();
     }
 
@@ -921,8 +921,8 @@ protected function curlExec($curl_options, $redirect = FALSE) {
       '@status' => $status,
       '!length' => format_size(strlen($this->drupalGetContent()))
     );
-    $message = t('!method @url returned @status (!length).', $message_vars);
-    $this->assertTrue($this->drupalGetContent() !== FALSE, $message, t('Browser'));
+    $message = $this->formatString('!method @url returned @status (!length).', $message_vars);
+    $this->assertTrue($this->drupalGetContent() !== FALSE, $message, 'Browser');
     return $this->drupalGetContent();
   }
 
@@ -999,14 +999,14 @@ protected function parse() {
       $htmlDom = new DOMDocument();
       @$htmlDom->loadHTML('<?xml encoding="UTF-8">' . $this->drupalGetContent());
       if ($htmlDom) {
-        $this->pass(t('Valid HTML found on "@path"', array('@path' => $this->getUrl())), t('Browser'));
+        $this->pass($this->formatString('Valid HTML found on "@path"', array('@path' => $this->getUrl())), 'Browser');
         // It's much easier to work with simplexml than DOM, luckily enough
         // we can just simply import our DOM tree.
         $this->elements = simplexml_import_dom($htmlDom);
       }
     }
     if (!$this->elements) {
-      $this->fail(t('Parsed page successfully.'), t('Browser'));
+      $this->fail('Parsed page successfully.', 'Browser');
     }
 
     return $this->elements;
@@ -1197,12 +1197,12 @@ protected function drupalPost($path, $edit, $submit, array $options = array(), a
       }
       // We have not found a form which contained all fields of $edit.
       foreach ($edit as $name => $value) {
-        $this->fail(t('Failed to set field @name to @value', array('@name' => $name, '@value' => $value)));
+        $this->fail($this->formatString('Failed to set field @name to @value', array('@name' => $name, '@value' => $value)));
       }
       if (!$ajax && isset($submit)) {
-        $this->assertTrue($submit_matches, t('Found the @submit button', array('@submit' => $submit)));
+        $this->assertTrue($submit_matches, $this->formatString('Found the @submit button', array('@submit' => $submit)));
       }
-      $this->fail(t('Found the requested form fields at @path', array('@path' => $path)));
+      $this->fail($this->formatString('Found the requested form fields at @path', array('@path' => $path)));
     }
   }
 
@@ -1711,7 +1711,7 @@ protected function getAllOptions(SimpleXMLElement $element) {
    */
   protected function assertLink($label, $index = 0, $message = '', $group = 'Other') {
     $links = $this->xpath('//a[normalize-space(text())=:label]', array(':label' => $label));
-    $message = ($message ?  $message : t('Link with label %label found.', array('%label' => $label)));
+    $message = ($message ?  $message : $this->formatString('Link with label %label found.', array('%label' => $label)));
     return $this->assert(isset($links[$index]), $message, $group);
   }
 
@@ -1731,7 +1731,7 @@ protected function assertLink($label, $index = 0, $message = '', $group = 'Other
    */
   protected function assertNoLink($label, $message = '', $group = 'Other') {
     $links = $this->xpath('//a[normalize-space(text())=:label]', array(':label' => $label));
-    $message = ($message ?  $message : t('Link with label %label not found.', array('%label' => $label)));
+    $message = ($message ?  $message : $this->formatString('Link with label %label not found.', array('%label' => $label)));
     return $this->assert(empty($links), $message, $group);
   }
 
@@ -1752,7 +1752,7 @@ protected function assertNoLink($label, $message = '', $group = 'Other') {
    */
   protected function assertLinkByHref($href, $index = 0, $message = '', $group = 'Other') {
     $links = $this->xpath('//a[contains(@href, :href)]', array(':href' => $href));
-    $message = ($message ?  $message : t('Link containing href %href found.', array('%href' => $href)));
+    $message = ($message ?  $message : $this->formatString('Link containing href %href found.', array('%href' => $href)));
     return $this->assert(isset($links[$index]), $message, $group);
   }
 
@@ -1771,7 +1771,7 @@ protected function assertLinkByHref($href, $index = 0, $message = '', $group = '
    */
   protected function assertNoLinkByHref($href, $message = '', $group = 'Other') {
     $links = $this->xpath('//a[contains(@href, :href)]', array(':href' => $href));
-    $message = ($message ?  $message : t('No link containing href %href found.', array('%href' => $href)));
+    $message = ($message ?  $message : $this->formatString('No link containing href %href found.', array('%href' => $href)));
     return $this->assert(empty($links), $message, $group);
   }
 
@@ -1798,7 +1798,7 @@ protected function clickLink($label, $index = 0) {
       $url_target = $this->getAbsoluteUrl($urls[$index]['href']);
     }
 
-    $this->assertTrue(isset($urls[$index]), t('Clicked link %label (@url_target) from @url_before', array('%label' => $label, '@url_target' => $url_target, '@url_before' => $url_before)), t('Browser'));
+    $this->assertTrue(isset($urls[$index]), $this->formatString('Clicked link %label (@url_target) from @url_before', array('%label' => $label, '@url_target' => $url_target, '@url_before' => $url_before)), 'Browser');
 
     if (isset($url_target)) {
       return $this->drupalGet($url_target);
@@ -2033,7 +2033,7 @@ protected function createTypedData($definition, $value = NULL, $context = array(
    */
   protected function assertUrl($path, array $options = array(), $message = '', $group = 'Other') {
     if (!$message) {
-      $message = t('Current URL is @url.', array(
+      $message = $this->formatString('Current URL is @url.', array(
         '@url' => var_export(url($path, $options), TRUE),
       ));
     }
@@ -2056,7 +2056,7 @@ protected function assertUrl($path, array $options = array(), $message = '', $gr
    */
   protected function assertRaw($raw, $message = '', $group = 'Other') {
     if (!$message) {
-      $message = t('Raw "@raw" found', array('@raw' => $raw));
+      $message = $this->formatString('Raw "@raw" found', array('@raw' => $raw));
     }
     return $this->assert(strpos($this->drupalGetContent(), $raw) !== FALSE, $message, $group);
   }
@@ -2076,7 +2076,7 @@ protected function assertRaw($raw, $message = '', $group = 'Other') {
    */
   protected function assertNoRaw($raw, $message = '', $group = 'Other') {
     if (!$message) {
-      $message = t('Raw "@raw" not found', array('@raw' => $raw));
+      $message = $this->formatString('Raw "@raw" not found', array('@raw' => $raw));
     }
     return $this->assert(strpos($this->drupalGetContent(), $raw) === FALSE, $message, $group);
   }
@@ -2138,7 +2138,7 @@ protected function assertTextHelper($text, $message = '', $group, $not_exists) {
       $this->plainTextContent = filter_xss($this->drupalGetContent(), array());
     }
     if (!$message) {
-      $message = !$not_exists ? t('"@text" found', array('@text' => $text)) : t('"@text" not found', array('@text' => $text));
+      $message = !$not_exists ? $this->formatString('"@text" found', array('@text' => $text)) : $this->formatString('"@text" not found', array('@text' => $text));
     }
     return $this->assert($not_exists == (strpos($this->plainTextContent, $text) === FALSE), $message, $group);
   }
@@ -2229,7 +2229,7 @@ protected function assertUniqueTextHelper($text, $message = '', $group, $be_uniq
    */
   protected function assertPattern($pattern, $message = '', $group = 'Other') {
     if (!$message) {
-      $message = t('Pattern "@pattern" found', array('@pattern' => $pattern));
+      $message = $this->formatString('Pattern "@pattern" found', array('@pattern' => $pattern));
     }
     return $this->assert((bool) preg_match($pattern, $this->drupalGetContent()), $message, $group);
   }
@@ -2248,7 +2248,7 @@ protected function assertPattern($pattern, $message = '', $group = 'Other') {
    */
   protected function assertNoPattern($pattern, $message = '', $group = 'Other') {
     if (!$message) {
-      $message = t('Pattern "@pattern" not found', array('@pattern' => $pattern));
+      $message = $this->formatString('Pattern "@pattern" not found', array('@pattern' => $pattern));
     }
     return $this->assert(!preg_match($pattern, $this->drupalGetContent()), $message, $group);
   }
@@ -2268,7 +2268,7 @@ protected function assertNoPattern($pattern, $message = '', $group = 'Other') {
   protected function assertTitle($title, $message = '', $group = 'Other') {
     $actual = (string) current($this->xpath('//title'));
     if (!$message) {
-      $message = t('Page title @actual is equal to @expected.', array(
+      $message = $this->formatString('Page title @actual is equal to @expected.', array(
         '@actual' => var_export($actual, TRUE),
         '@expected' => var_export($title, TRUE),
       ));
@@ -2291,7 +2291,7 @@ protected function assertTitle($title, $message = '', $group = 'Other') {
   protected function assertNoTitle($title, $message = '', $group = 'Other') {
     $actual = (string) current($this->xpath('//title'));
     if (!$message) {
-      $message = t('Page title @actual is not equal to @unexpected.', array(
+      $message = $this->formatString('Page title @actual is not equal to @unexpected.', array(
         '@actual' => var_export($actual, TRUE),
         '@unexpected' => var_export($title, TRUE),
       ));
@@ -2451,18 +2451,18 @@ protected function assertNoFieldByXPath($xpath, $value = NULL, $message = '', $g
   protected function assertFieldByName($name, $value = NULL, $message = NULL) {
     if (!isset($message)) {
       if (!isset($value)) {
-        $message = t('Found field with name @name', array(
+        $message = $this->formatString('Found field with name @name', array(
           '@name' => var_export($name, TRUE),
         ));
       }
       else {
-        $message = t('Found field with name @name and value @value', array(
+        $message = $this->formatString('Found field with name @name and value @value', array(
           '@name' => var_export($name, TRUE),
           '@value' => var_export($value, TRUE),
         ));
       }
     }
-    return $this->assertFieldByXPath($this->constructFieldXpath('name', $name), $value, $message, t('Browser'));
+    return $this->assertFieldByXPath($this->constructFieldXpath('name', $name), $value, $message, 'Browser');
   }
 
   /**
@@ -2480,7 +2480,7 @@ protected function assertFieldByName($name, $value = NULL, $message = NULL) {
    *   TRUE on pass, FALSE on fail.
    */
   protected function assertNoFieldByName($name, $value = '', $message = '') {
-    return $this->assertNoFieldByXPath($this->constructFieldXpath('name', $name), $value, $message ? $message : t('Did not find field by name @name', array('@name' => $name)), t('Browser'));
+    return $this->assertNoFieldByXPath($this->constructFieldXpath('name', $name), $value, $message ? $message : $this->formatString('Did not find field by name @name', array('@name' => $name)), 'Browser');
   }
 
   /**
@@ -2498,7 +2498,7 @@ protected function assertNoFieldByName($name, $value = '', $message = '') {
    *   TRUE on pass, FALSE on fail.
    */
   protected function assertFieldById($id, $value = '', $message = '') {
-    return $this->assertFieldByXPath($this->constructFieldXpath('id', $id), $value, $message ? $message : t('Found field by id @id', array('@id' => $id)), t('Browser'));
+    return $this->assertFieldByXPath($this->constructFieldXpath('id', $id), $value, $message ? $message : $this->formatString('Found field by id @id', array('@id' => $id)), 'Browser');
   }
 
   /**
@@ -2516,7 +2516,7 @@ protected function assertFieldById($id, $value = '', $message = '') {
    *   TRUE on pass, FALSE on fail.
    */
   protected function assertNoFieldById($id, $value = '', $message = '') {
-    return $this->assertNoFieldByXPath($this->constructFieldXpath('id', $id), $value, $message ? $message : t('Did not find field by id @id', array('@id' => $id)), t('Browser'));
+    return $this->assertNoFieldByXPath($this->constructFieldXpath('id', $id), $value, $message ? $message : $this->formatString('Did not find field by id @id', array('@id' => $id)), 'Browser');
   }
 
   /**
@@ -2531,7 +2531,7 @@ protected function assertNoFieldById($id, $value = '', $message = '') {
    */
   protected function assertFieldChecked($id, $message = '') {
     $elements = $this->xpath('//input[@id=:id]', array(':id' => $id));
-    return $this->assertTrue(isset($elements[0]) && !empty($elements[0]['checked']), $message ? $message : t('Checkbox field @id is checked.', array('@id' => $id)), t('Browser'));
+    return $this->assertTrue(isset($elements[0]) && !empty($elements[0]['checked']), $message ? $message : $this->formatString('Checkbox field @id is checked.', array('@id' => $id)), 'Browser');
   }
 
   /**
@@ -2546,7 +2546,7 @@ protected function assertFieldChecked($id, $message = '') {
    */
   protected function assertNoFieldChecked($id, $message = '') {
     $elements = $this->xpath('//input[@id=:id]', array(':id' => $id));
-    return $this->assertTrue(isset($elements[0]) && empty($elements[0]['checked']), $message ? $message : t('Checkbox field @id is not checked.', array('@id' => $id)), t('Browser'));
+    return $this->assertTrue(isset($elements[0]) && empty($elements[0]['checked']), $message ? $message : $this->formatString('Checkbox field @id is not checked.', array('@id' => $id)), 'Browser');
   }
 
   /**
@@ -2563,7 +2563,7 @@ protected function assertNoFieldChecked($id, $message = '') {
    */
   protected function assertOption($id, $option, $message = '') {
     $options = $this->xpath('//select[@id=:id]/option[@value=:option]', array(':id' => $id, ':option' => $option));
-    return $this->assertTrue(isset($options[0]), $message ? $message : t('Option @option for field @id exists.', array('@option' => $option, '@id' => $id)), t('Browser'));
+    return $this->assertTrue(isset($options[0]), $message ? $message : $this->formatString('Option @option for field @id exists.', array('@option' => $option, '@id' => $id)), 'Browser');
   }
 
   /**
@@ -2581,7 +2581,7 @@ protected function assertOption($id, $option, $message = '') {
   protected function assertNoOption($id, $option, $message = '') {
     $selects = $this->xpath('//select[@id=:id]', array(':id' => $id));
     $options = $this->xpath('//select[@id=:id]/option[@value=:option]', array(':id' => $id, ':option' => $option));
-    return $this->assertTrue(isset($selects[0]) && !isset($options[0]), $message ? $message : t('Option @option for field @id does not exist.', array('@option' => $option, '@id' => $id)), t('Browser'));
+    return $this->assertTrue(isset($selects[0]) && !isset($options[0]), $message ? $message : $this->formatString('Option @option for field @id does not exist.', array('@option' => $option, '@id' => $id)), 'Browser');
   }
 
   /**
@@ -2600,7 +2600,7 @@ protected function assertNoOption($id, $option, $message = '') {
    */
   protected function assertOptionSelected($id, $option, $message = '') {
     $elements = $this->xpath('//select[@id=:id]//option[@value=:option]', array(':id' => $id, ':option' => $option));
-    return $this->assertTrue(isset($elements[0]) && !empty($elements[0]['selected']), $message ? $message : t('Option @option for field @id is selected.', array('@option' => $option, '@id' => $id)), t('Browser'));
+    return $this->assertTrue(isset($elements[0]) && !empty($elements[0]['selected']), $message ? $message : $this->formatString('Option @option for field @id is selected.', array('@option' => $option, '@id' => $id)), 'Browser');
   }
 
   /**
@@ -2617,7 +2617,7 @@ protected function assertOptionSelected($id, $option, $message = '') {
    */
   protected function assertNoOptionSelected($id, $option, $message = '') {
     $elements = $this->xpath('//select[@id=:id]//option[@value=:option]', array(':id' => $id, ':option' => $option));
-    return $this->assertTrue(isset($elements[0]) && empty($elements[0]['selected']), $message ? $message : t('Option @option for field @id is not selected.', array('@option' => $option, '@id' => $id)), t('Browser'));
+    return $this->assertTrue(isset($elements[0]) && empty($elements[0]['selected']), $message ? $message : $this->formatString('Option @option for field @id is not selected.', array('@option' => $option, '@id' => $id)), 'Browser');
   }
 
   /**
@@ -2674,7 +2674,7 @@ protected function assertNoDuplicateIds($message = '', $group = 'Other', $ids_to
     foreach ($this->xpath('//*[@id]') as $element) {
       $id = (string) $element['id'];
       if (isset($seen_ids[$id]) && !in_array($id, $ids_to_skip)) {
-        $this->fail(t('The HTML ID %id is unique.', array('%id' => $id)), $group);
+        $this->fail($this->formatString('The HTML ID %id is unique.', array('%id' => $id)), $group);
         $status = FALSE;
       }
       $seen_ids[$id] = TRUE;
@@ -2711,7 +2711,7 @@ protected function constructFieldXpath($attribute, $value) {
   protected function assertResponse($code, $message = '') {
     $curl_code = curl_getinfo($this->curlHandle, CURLINFO_HTTP_CODE);
     $match = is_array($code) ? in_array($curl_code, $code) : $curl_code == $code;
-    return $this->assertTrue($match, $message ? $message : t('HTTP response expected !code, actual !curl_code', array('!code' => $code, '!curl_code' => $curl_code)), t('Browser'));
+    return $this->assertTrue($match, $message ? $message : $this->formatString('HTTP response expected !code, actual !curl_code', array('!code' => $code, '!curl_code' => $curl_code)), 'Browser');
   }
 
   /**
@@ -2729,7 +2729,7 @@ protected function assertResponse($code, $message = '') {
   protected function assertNoResponse($code, $message = '') {
     $curl_code = curl_getinfo($this->curlHandle, CURLINFO_HTTP_CODE);
     $match = is_array($code) ? in_array($curl_code, $code) : $curl_code == $code;
-    return $this->assertFalse($match, $message ? $message : t('HTTP response not expected !code, actual !curl_code', array('!code' => $code, '!curl_code' => $curl_code)), t('Browser'));
+    return $this->assertFalse($match, $message ? $message : $this->formatString('HTTP response not expected !code, actual !curl_code', array('!code' => $code, '!curl_code' => $curl_code)), 'Browser');
   }
 
   /**
@@ -2750,7 +2750,7 @@ protected function assertNoResponse($code, $message = '') {
   protected function assertMail($name, $value = '', $message = '') {
     $captured_emails = variable_get('drupal_test_email_collector', array());
     $email = end($captured_emails);
-    return $this->assertTrue($email && isset($email[$name]) && $email[$name] == $value, $message, t('E-mail'));
+    return $this->assertTrue($email && isset($email[$name]) && $email[$name] == $value, $message, 'E-mail');
   }
 
   /**
@@ -2780,7 +2780,7 @@ protected function assertMailString($field_name, $string, $email_depth) {
         break;
       }
     }
-    return $this->assertTrue($string_found, t('Expected text found in @field of email message: "@expected".', array('@field' => $field_name, '@expected' => $string)));
+    return $this->assertTrue($string_found, $this->formatString('Expected text found in @field of email message: "@expected".', array('@field' => $field_name, '@expected' => $string)));
   }
 
   /**
@@ -2798,7 +2798,7 @@ protected function assertMailPattern($field_name, $regex, $message) {
     $mails = $this->drupalGetMails();
     $mail = end($mails);
     $regex_found = preg_match("/$regex/", $mail[$field_name]);
-    return $this->assertTrue($regex_found, t('Expected text found in @field of email message: "@expected".', array('@field' => $field_name, '@expected' => $regex)));
+    return $this->assertTrue($regex_found, $this->formatString('Expected text found in @field of email message: "@expected".', array('@field' => $field_name, '@expected' => $regex)));
   }
 
   /**
@@ -2811,7 +2811,7 @@ protected function verboseEmail($count = 1) {
     $mails = $this->drupalGetMails();
     for ($i = count($mails) -1; $i >= count($mails) - $count && $i >= 0; $i--) {
       $mail = $mails[$i];
-      $this->verbose(t('Email:') . '<pre>' . print_r($mail, TRUE) . '</pre>');
+      $this->verbose('Email:<pre>' . print_r($mail, TRUE) . '</pre>');
     }
   }
 }
