diff --git a/core/lib/Drupal/Core/Routing/DrupalUrlGenerator.php b/core/lib/Drupal/Core/Routing/DrupalUrlGenerator.php
new file mode 100644
index 0000000..2d49d0a
--- /dev/null
+++ b/core/lib/Drupal/Core/Routing/DrupalUrlGenerator.php
@@ -0,0 +1,46 @@
+<?php
+namespace Drupal\Core\Routing;
+
+use Symfony\Component\Routing\Generator\UrlGenerator;
+use Symfony\Component\Routing\RequestContext;
+use Symfony\Component\Routing\RouteCollection;
+use Symfony\Component\Routing\Exception\RouteNotFoundException;
+use Symfony\Component\Routing\Route;
+
+/**
+ * DrupalUrlGenerator generates a URL based on definitons in the router table.
+ */
+class DrupalUrlGenerator extends UrlGenerator {
+
+  public function __construct() {
+    //I need to pass some RouteCollection and RequestContext.
+    //Empty ones will do for now.
+    parent::__construct(new RouteCollection(), new RequestContext(), null);
+  }
+
+  /**
+   * Generates a URL from the given parameters.
+   */
+  public function generate($name, $parameters = array(), $absolute = false) {
+    $result = db_query("select route from {router} where name = :name", array(':name' => $name));
+    $matches = $result->fetchAll();
+
+    if (count($matches) == 0) {
+      throw new RouteNotFoundException(sprintf('Route "%s" does not exist.', $name));
+    }
+
+    $row = $matches[0];
+
+    $route = unserialize($row->route);
+
+    //Test fixtures set compiler_class to Drupal\Core\Routing\RouteCompiler
+    //which produces compiled routes without a getVariables method
+    //fixing it hardcoded for now.
+    $route->setOption('compiler_class', '\Symfony\Component\Routing\RouteCompiler');
+
+    // the Route has a cache of its own and is not recompiled as long as it does not get modified
+    $compiledRoute = $route->compile();
+
+    return $this->doGenerate($compiledRoute->getVariables(), $route->getDefaults(), $route->getRequirements(), $compiledRoute->getTokens(), $parameters, $name, $absolute);
+  }
+}
diff --git a/core/modules/system/lib/Drupal/system/Tests/File/DirectoryTest.php b/core/modules/system/lib/Drupal/system/Tests/File/DirectoryTest.php
index e6f3396..878dae4 100644
--- a/core/modules/system/lib/Drupal/system/Tests/File/DirectoryTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/File/DirectoryTest.php
@@ -25,16 +25,16 @@ public static function getInfo() {
   function testFileCheckDirectoryHandling() {
     // A directory to operate on.
     $directory = file_default_scheme() . '://' . $this->randomName() . '/' . $this->randomName();
-    $this->assertFalse(is_dir($directory), 'Directory does not exist prior to testing.');
+    $this->assertFalse(is_dir($directory), t('Directory does not exist prior to testing.'));
 
     // Non-existent directory.
-    $this->assertFalse(file_prepare_directory($directory, 0), 'Error reported for non-existing directory.', 'File');
+    $this->assertFalse(file_prepare_directory($directory, 0), t('Error reported for non-existing directory.'), 'File');
 
     // Make a directory.
-    $this->assertTrue(file_prepare_directory($directory, FILE_CREATE_DIRECTORY), 'No error reported when creating a new directory.', 'File');
+    $this->assertTrue(file_prepare_directory($directory, FILE_CREATE_DIRECTORY), t('No error reported when creating a new directory.'), 'File');
 
     // Make sure directory actually exists.
-    $this->assertTrue(is_dir($directory), 'Directory actually exists.', 'File');
+    $this->assertTrue(is_dir($directory), t('Directory actually exists.'), 'File');
 
     if (substr(PHP_OS, 0, 3) != 'WIN') {
       // PHP on Windows doesn't support any kind of useful read-only mode for
@@ -44,10 +44,10 @@ function testFileCheckDirectoryHandling() {
 
       // Make directory read only.
       @drupal_chmod($directory, 0444);
-      $this->assertFalse(file_prepare_directory($directory, 0), 'Error reported for a non-writeable directory.', 'File');
+      $this->assertFalse(file_prepare_directory($directory, 0), t('Error reported for a non-writeable directory.'), 'File');
 
       // Test directory permission modification.
-      $this->assertTrue(file_prepare_directory($directory, FILE_MODIFY_PERMISSIONS), 'No error reported when making directory writeable.', 'File');
+      $this->assertTrue(file_prepare_directory($directory, FILE_MODIFY_PERMISSIONS), t('No error reported when making directory writeable.'), 'File');
     }
 
     // Test that the directory has the correct permissions.
@@ -55,12 +55,12 @@ function testFileCheckDirectoryHandling() {
 
     // Remove .htaccess file to then test that it gets re-created.
     @drupal_unlink(file_default_scheme() . '://.htaccess');
-    $this->assertFalse(is_file(file_default_scheme() . '://.htaccess'), 'Successfully removed the .htaccess file in the files directory.', 'File');
+    $this->assertFalse(is_file(file_default_scheme() . '://.htaccess'), t('Successfully removed the .htaccess file in the files directory.'), 'File');
     file_ensure_htaccess();
-    $this->assertTrue(is_file(file_default_scheme() . '://.htaccess'), 'Successfully re-created the .htaccess file in the files directory.', 'File');
+    $this->assertTrue(is_file(file_default_scheme() . '://.htaccess'), t('Successfully re-created the .htaccess file in the files directory.'), 'File');
     // Verify contents of .htaccess file.
     $file = file_get_contents(file_default_scheme() . '://.htaccess');
-    $this->assertEqual($file, "SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006\nOptions None\nOptions +FollowSymLinks", 'The .htaccess file contains the proper content.', 'File');
+    $this->assertEqual($file, "SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006\nOptions None\nOptions +FollowSymLinks", t('The .htaccess file contains the proper content.'), 'File');
   }
 
   /**
@@ -74,14 +74,14 @@ function testFileCreateNewFilepath() {
     $directory = 'core/misc';
     $original = $directory . '/' . $basename;
     $path = file_create_filename($basename, $directory);
-    $this->assertEqual($path, $original, format_string('New filepath %new equals %original.', array('%new' => $path, '%original' => $original)), 'File');
+    $this->assertEqual($path, $original, t('New filepath %new equals %original.', array('%new' => $path, '%original' => $original)), 'File');
 
     // Then we test against a file that already exists within that directory.
     $basename = 'druplicon.png';
     $original = $directory . '/' . $basename;
     $expected = $directory . '/druplicon_0.png';
     $path = file_create_filename($basename, $directory);
-    $this->assertEqual($path, $expected, format_string('Creating a new filepath from %original equals %new (expected %expected).', array('%new' => $path, '%original' => $original, '%expected' => $expected)), 'File');
+    $this->assertEqual($path, $expected, t('Creating a new filepath from %original equals %new (expected %expected).', array('%new' => $path, '%original' => $original, '%expected' => $expected)), 'File');
 
     // @TODO: Finally we copy a file into a directory several times, to ensure a properly iterating filename suffix.
   }
@@ -102,19 +102,19 @@ function testFileDestination() {
     // First test for non-existent file.
     $destination = 'core/misc/xyz.txt';
     $path = file_destination($destination, FILE_EXISTS_REPLACE);
-    $this->assertEqual($path, $destination, 'Non-existing filepath destination is correct with FILE_EXISTS_REPLACE.', 'File');
+    $this->assertEqual($path, $destination, t('Non-existing filepath destination is correct with FILE_EXISTS_REPLACE.'), 'File');
     $path = file_destination($destination, FILE_EXISTS_RENAME);
-    $this->assertEqual($path, $destination, 'Non-existing filepath destination is correct with FILE_EXISTS_RENAME.', 'File');
+    $this->assertEqual($path, $destination, t('Non-existing filepath destination is correct with FILE_EXISTS_RENAME.'), 'File');
     $path = file_destination($destination, FILE_EXISTS_ERROR);
-    $this->assertEqual($path, $destination, 'Non-existing filepath destination is correct with FILE_EXISTS_ERROR.', 'File');
+    $this->assertEqual($path, $destination, t('Non-existing filepath destination is correct with FILE_EXISTS_ERROR.'), 'File');
 
     $destination = 'core/misc/druplicon.png';
     $path = file_destination($destination, FILE_EXISTS_REPLACE);
-    $this->assertEqual($path, $destination, 'Existing filepath destination remains the same with FILE_EXISTS_REPLACE.', 'File');
+    $this->assertEqual($path, $destination, t('Existing filepath destination remains the same with FILE_EXISTS_REPLACE.'), 'File');
     $path = file_destination($destination, FILE_EXISTS_RENAME);
-    $this->assertNotEqual($path, $destination, 'A new filepath destination is created when filepath destination already exists with FILE_EXISTS_RENAME.', 'File');
+    $this->assertNotEqual($path, $destination, t('A new filepath destination is created when filepath destination already exists with FILE_EXISTS_RENAME.'), 'File');
     $path = file_destination($destination, FILE_EXISTS_ERROR);
-    $this->assertEqual($path, FALSE, 'An error is returned when filepath destination already exists with FILE_EXISTS_ERROR.', 'File');
+    $this->assertEqual($path, FALSE, t('An error is returned when filepath destination already exists with FILE_EXISTS_ERROR.'), 'File');
   }
 
   /**
@@ -124,7 +124,7 @@ function testFileDirectoryTemp() {
     // Start with an empty variable to ensure we have a clean slate.
     variable_set('file_temporary_path', '');
     $tmp_directory = file_directory_temp();
-    $this->assertEqual(empty($tmp_directory), FALSE, 'file_directory_temp() returned a non-empty value.');
+    $this->assertEqual(empty($tmp_directory), FALSE, t('file_directory_temp() returned a non-empty value.'));
     $setting = variable_get('file_temporary_path', '');
     $this->assertEqual($setting, $tmp_directory, "The 'file_temporary_path' variable has the same value that file_directory_temp() returned.");
   }
diff --git a/core/modules/system/lib/Drupal/system/Tests/File/UnmanagedCopyTest.php b/core/modules/system/lib/Drupal/system/Tests/File/UnmanagedCopyTest.php
index 7056946..ca01900 100644
--- a/core/modules/system/lib/Drupal/system/Tests/File/UnmanagedCopyTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/File/UnmanagedCopyTest.php
@@ -39,7 +39,7 @@ function testNormal() {
     $desired_filepath = 'public://' . $this->randomName();
     $this->assertTrue(file_put_contents($desired_filepath, ' '), 'Created a file so a rename will have to happen.');
     $newer_filepath = file_unmanaged_copy($uri, $desired_filepath, FILE_EXISTS_RENAME);
-    $this->assertTrue($newer_filepath, 'Copy was successful.');
+    $this->assertTrue($newer_filepath, t('Copy was successful.'));
     $this->assertNotEqual($newer_filepath, $desired_filepath, 'Returned expected filepath.');
     $this->assertTrue(file_exists($uri), 'Original file remains.');
     $this->assertTrue(file_exists($newer_filepath), 'New file exists.');
@@ -83,7 +83,7 @@ function testOverwriteSelf() {
     // Copy the file into same directory without renaming fails.
     $new_filepath = file_unmanaged_copy($uri, drupal_dirname($uri), FILE_EXISTS_ERROR);
     $this->assertFalse($new_filepath, 'Copying onto itself fails.');
-    $this->assertTrue(file_exists($uri), 'File exists after copying onto itself.');
+    $this->assertTrue(file_exists($uri), t('File exists after copying onto itself.'));
 
     // Copy the file into same directory with renaming works.
     $new_filepath = file_unmanaged_copy($uri, drupal_dirname($uri), FILE_EXISTS_RENAME);
diff --git a/core/modules/system/lib/Drupal/system/Tests/Graph/GraphUnitTest.php b/core/modules/system/lib/Drupal/system/Tests/Graph/GraphUnitTest.php
index a68535c..e1fa8da 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Graph/GraphUnitTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Graph/GraphUnitTest.php
@@ -72,7 +72,7 @@ function testDepthFirstSearch() {
     $this->assertReversePaths($graph, $expected_reverse_paths);
 
     // Assert that DFS didn't created "missing" vertexes automatically.
-    $this->assertFALSE(isset($graph[6]), 'Vertex 6 has not been created');
+    $this->assertFALSE(isset($graph[6]), t('Vertex 6 has not been created'));
 
     $expected_components = array(
       array(1, 2, 3, 4, 5, 7),
@@ -119,7 +119,7 @@ function assertPaths($graph, $expected_paths) {
       // Build an array with keys = $paths and values = TRUE.
       $expected = array_fill_keys($paths, TRUE);
       $result = isset($graph[$vertex]['paths']) ? $graph[$vertex]['paths'] : array();
-      $this->assertEqual($expected, $result, format_string('Expected paths for vertex @vertex: @expected-paths, got @paths', array('@vertex' => $vertex, '@expected-paths' => $this->displayArray($expected, TRUE), '@paths' => $this->displayArray($result, TRUE))));
+      $this->assertEqual($expected, $result, t('Expected paths for vertex @vertex: @expected-paths, got @paths', array('@vertex' => $vertex, '@expected-paths' => $this->displayArray($expected, TRUE), '@paths' => $this->displayArray($result, TRUE))));
     }
   }
 
@@ -137,7 +137,7 @@ function assertReversePaths($graph, $expected_reverse_paths) {
       // Build an array with keys = $paths and values = TRUE.
       $expected = array_fill_keys($paths, TRUE);
       $result = isset($graph[$vertex]['reverse_paths']) ? $graph[$vertex]['reverse_paths'] : array();
-      $this->assertEqual($expected, $result, format_string('Expected reverse paths for vertex @vertex: @expected-paths, got @paths', array('@vertex' => $vertex, '@expected-paths' => $this->displayArray($expected, TRUE), '@paths' => $this->displayArray($result, TRUE))));
+      $this->assertEqual($expected, $result, t('Expected reverse paths for vertex @vertex: @expected-paths, got @paths', array('@vertex' => $vertex, '@expected-paths' => $this->displayArray($expected, TRUE), '@paths' => $this->displayArray($result, TRUE))));
     }
   }
 
@@ -157,9 +157,9 @@ function assertComponents($graph, $expected_components) {
         $result_components[] = $graph[$vertex]['component'];
         unset($unassigned_vertices[$vertex]);
       }
-      $this->assertEqual(1, count(array_unique($result_components)), format_string('Expected one unique component for vertices @vertices, got @components', array('@vertices' => $this->displayArray($component), '@components' => $this->displayArray($result_components))));
+      $this->assertEqual(1, count(array_unique($result_components)), t('Expected one unique component for vertices @vertices, got @components', array('@vertices' => $this->displayArray($component), '@components' => $this->displayArray($result_components))));
     }
-    $this->assertEqual(array(), $unassigned_vertices, format_string('Vertices not assigned to a component: @vertices', array('@vertices' => $this->displayArray($unassigned_vertices, TRUE))));
+    $this->assertEqual(array(), $unassigned_vertices, t('Vertices not assigned to a component: @vertices', array('@vertices' => $this->displayArray($unassigned_vertices, TRUE))));
   }
 
   /**
@@ -174,7 +174,7 @@ function assertWeights($graph, $expected_orders) {
     foreach ($expected_orders as $order) {
       $previous_vertex = array_shift($order);
       foreach ($order as $vertex) {
-        $this->assertTrue($graph[$previous_vertex]['weight'] < $graph[$vertex]['weight'], format_string('Weights of @previous-vertex and @vertex are correct relative to each other', array('@previous-vertex' => $previous_vertex, '@vertex' => $vertex)));
+        $this->assertTrue($graph[$previous_vertex]['weight'] < $graph[$vertex]['weight'], t('Weights of @previous-vertex and @vertex are correct relative to each other', array('@previous-vertex' => $previous_vertex, '@vertex' => $vertex)));
       }
     }
   }
diff --git a/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitGdTest.php b/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitGdTest.php
index 22f6c13..611126d 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitGdTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitGdTest.php
@@ -212,7 +212,7 @@ function testManipulations() {
 
         // All images should be converted to truecolor when loaded.
         $image_truecolor = imageistruecolor($image->resource);
-        $this->assertTrue($image_truecolor, format_string('Image %file after load is a truecolor image.', array('%file' => $file)));
+        $this->assertTrue($image_truecolor, t('Image %file after load is a truecolor image.', array('%file' => $file)));
 
         if ($image->info['extension'] == 'gif') {
           if ($op == 'desaturate') {
@@ -248,8 +248,8 @@ function testManipulations() {
         file_prepare_directory($directory, FILE_CREATE_DIRECTORY);
         image_save($image, $directory . '/' . $op . '.' . $image->info['extension']);
 
-        $this->assertTrue($correct_dimensions_real, format_string('Image %file after %action action has proper dimensions.', array('%file' => $file, '%action' => $op)));
-        $this->assertTrue($correct_dimensions_object, format_string('Image %file object after %action action is reporting the proper height and width values.', array('%file' => $file, '%action' => $op)));
+        $this->assertTrue($correct_dimensions_real, t('Image %file after %action action has proper dimensions.', array('%file' => $file, '%action' => $op)));
+        $this->assertTrue($correct_dimensions_object, t('Image %file object after %action action is reporting the proper height and width values.', array('%file' => $file, '%action' => $op)));
 
         // JPEG colors will always be messed up due to compression.
         if ($image->info['extension'] != 'jpg') {
@@ -276,7 +276,7 @@ function testManipulations() {
             }
             $color = $this->getPixelColor($image, $x, $y);
             $correct_colors = $this->colorsAreEqual($color, $corner);
-            $this->assertTrue($correct_colors, format_string('Image %file object after %action action has the correct color placement at corner %corner.', array('%file' => $file, '%action' => $op, '%corner' => $key)));
+            $this->assertTrue($correct_colors, t('Image %file object after %action action has the correct color placement at corner %corner.', array('%file' => $file, '%action' => $op, '%corner' => $key)));
           }
         }
       }
diff --git a/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitTest.php b/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitTest.php
index 3e5aadd..091fc5a 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitTest.php
@@ -25,8 +25,8 @@ public static function getInfo() {
    */
   function testGetAvailableToolkits() {
     $toolkits = image_get_available_toolkits();
-    $this->assertTrue(isset($toolkits['test']), 'The working toolkit was returned.');
-    $this->assertFalse(isset($toolkits['broken']), 'The toolkit marked unavailable was not returned');
+    $this->assertTrue(isset($toolkits['test']), t('The working toolkit was returned.'));
+    $this->assertFalse(isset($toolkits['broken']), t('The toolkit marked unavailable was not returned'));
     $this->assertToolkitOperationsCalled(array());
   }
 
@@ -35,8 +35,8 @@ function testGetAvailableToolkits() {
    */
   function testLoad() {
     $image = image_load($this->file, $this->toolkit);
-    $this->assertTrue(is_object($image), 'Returned an object.');
-    $this->assertEqual($this->toolkit, $image->toolkit, 'Image had toolkit set.');
+    $this->assertTrue(is_object($image), t('Returned an object.'));
+    $this->assertEqual($this->toolkit, $image->toolkit, t('Image had toolkit set.'));
     $this->assertToolkitOperationsCalled(array('load', 'get_info'));
   }
 
@@ -44,7 +44,7 @@ function testLoad() {
    * Test the image_save() function.
    */
   function testSave() {
-    $this->assertFalse(image_save($this->image), 'Function returned the expected value.');
+    $this->assertFalse(image_save($this->image), t('Function returned the expected value.'));
     $this->assertToolkitOperationsCalled(array('save'));
   }
 
@@ -52,13 +52,13 @@ function testSave() {
    * Test the image_resize() function.
    */
   function testResize() {
-    $this->assertTrue(image_resize($this->image, 1, 2), 'Function returned the expected value.');
+    $this->assertTrue(image_resize($this->image, 1, 2), t('Function returned the expected value.'));
     $this->assertToolkitOperationsCalled(array('resize'));
 
     // Check the parameters.
     $calls = image_test_get_all_calls();
-    $this->assertEqual($calls['resize'][0][1], 1, 'Width was passed correctly');
-    $this->assertEqual($calls['resize'][0][2], 2, 'Height was passed correctly');
+    $this->assertEqual($calls['resize'][0][1], 1, t('Width was passed correctly'));
+    $this->assertEqual($calls['resize'][0][2], 2, t('Height was passed correctly'));
   }
 
   /**
@@ -66,68 +66,68 @@ function testResize() {
    */
   function testScale() {
 // TODO: need to test upscaling
-    $this->assertTrue(image_scale($this->image, 10, 10), 'Function returned the expected value.');
+    $this->assertTrue(image_scale($this->image, 10, 10), t('Function returned the expected value.'));
     $this->assertToolkitOperationsCalled(array('resize'));
 
     // Check the parameters.
     $calls = image_test_get_all_calls();
-    $this->assertEqual($calls['resize'][0][1], 10, 'Width was passed correctly');
-    $this->assertEqual($calls['resize'][0][2], 5, 'Height was based off aspect ratio and passed correctly');
+    $this->assertEqual($calls['resize'][0][1], 10, t('Width was passed correctly'));
+    $this->assertEqual($calls['resize'][0][2], 5, t('Height was based off aspect ratio and passed correctly'));
   }
 
   /**
    * Test the image_scale_and_crop() function.
    */
   function testScaleAndCrop() {
-    $this->assertTrue(image_scale_and_crop($this->image, 5, 10), 'Function returned the expected value.');
+    $this->assertTrue(image_scale_and_crop($this->image, 5, 10), t('Function returned the expected value.'));
     $this->assertToolkitOperationsCalled(array('resize', 'crop'));
 
     // Check the parameters.
     $calls = image_test_get_all_calls();
 
-    $this->assertEqual($calls['crop'][0][1], 7.5, 'X was computed and passed correctly');
-    $this->assertEqual($calls['crop'][0][2], 0, 'Y was computed and passed correctly');
-    $this->assertEqual($calls['crop'][0][3], 5, 'Width was computed and passed correctly');
-    $this->assertEqual($calls['crop'][0][4], 10, 'Height was computed and passed correctly');
+    $this->assertEqual($calls['crop'][0][1], 7.5, t('X was computed and passed correctly'));
+    $this->assertEqual($calls['crop'][0][2], 0, t('Y was computed and passed correctly'));
+    $this->assertEqual($calls['crop'][0][3], 5, t('Width was computed and passed correctly'));
+    $this->assertEqual($calls['crop'][0][4], 10, t('Height was computed and passed correctly'));
   }
 
   /**
    * Test the image_rotate() function.
    */
   function testRotate() {
-    $this->assertTrue(image_rotate($this->image, 90, 1), 'Function returned the expected value.');
+    $this->assertTrue(image_rotate($this->image, 90, 1), t('Function returned the expected value.'));
     $this->assertToolkitOperationsCalled(array('rotate'));
 
     // Check the parameters.
     $calls = image_test_get_all_calls();
-    $this->assertEqual($calls['rotate'][0][1], 90, 'Degrees were passed correctly');
-    $this->assertEqual($calls['rotate'][0][2], 1, 'Background color was passed correctly');
+    $this->assertEqual($calls['rotate'][0][1], 90, t('Degrees were passed correctly'));
+    $this->assertEqual($calls['rotate'][0][2], 1, t('Background color was passed correctly'));
   }
 
   /**
    * Test the image_crop() function.
    */
   function testCrop() {
-    $this->assertTrue(image_crop($this->image, 1, 2, 3, 4), 'Function returned the expected value.');
+    $this->assertTrue(image_crop($this->image, 1, 2, 3, 4), t('Function returned the expected value.'));
     $this->assertToolkitOperationsCalled(array('crop'));
 
     // Check the parameters.
     $calls = image_test_get_all_calls();
-    $this->assertEqual($calls['crop'][0][1], 1, 'X was passed correctly');
-    $this->assertEqual($calls['crop'][0][2], 2, 'Y was passed correctly');
-    $this->assertEqual($calls['crop'][0][3], 3, 'Width was passed correctly');
-    $this->assertEqual($calls['crop'][0][4], 4, 'Height was passed correctly');
+    $this->assertEqual($calls['crop'][0][1], 1, t('X was passed correctly'));
+    $this->assertEqual($calls['crop'][0][2], 2, t('Y was passed correctly'));
+    $this->assertEqual($calls['crop'][0][3], 3, t('Width was passed correctly'));
+    $this->assertEqual($calls['crop'][0][4], 4, t('Height was passed correctly'));
   }
 
   /**
    * Test the image_desaturate() function.
    */
   function testDesaturate() {
-    $this->assertTrue(image_desaturate($this->image), 'Function returned the expected value.');
+    $this->assertTrue(image_desaturate($this->image), t('Function returned the expected value.'));
     $this->assertToolkitOperationsCalled(array('desaturate'));
 
     // Check the parameters.
     $calls = image_test_get_all_calls();
-    $this->assertEqual(count($calls['desaturate'][0]), 1, 'Only the image was passed.');
+    $this->assertEqual(count($calls['desaturate'][0]), 1, t('Only the image was passed.'));
   }
 }
diff --git a/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitTestBase.php b/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitTestBase.php
index 51409d5..ac47080 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitTestBase.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitTestBase.php
@@ -62,19 +62,19 @@ function assertToolkitOperationsCalled(array $expected) {
     // Determine if there were any expected that were not called.
     $uncalled = array_diff($expected, $actual);
     if (count($uncalled)) {
-      $this->assertTrue(FALSE, format_string('Expected operations %expected to be called but %uncalled was not called.', array('%expected' => implode(', ', $expected), '%uncalled' => implode(', ', $uncalled))));
+      $this->assertTrue(FALSE, t('Expected operations %expected to be called but %uncalled was not called.', array('%expected' => implode(', ', $expected), '%uncalled' => implode(', ', $uncalled))));
     }
     else {
-      $this->assertTrue(TRUE, format_string('All the expected operations were called: %expected', array('%expected' => implode(', ', $expected))));
+      $this->assertTrue(TRUE, t('All the expected operations were called: %expected', array('%expected' => implode(', ', $expected))));
     }
 
     // Determine if there were any unexpected calls.
     $unexpected = array_diff($actual, $expected);
     if (count($unexpected)) {
-      $this->assertTrue(FALSE, format_string('Unexpected operations were called: %unexpected.', array('%unexpected' => implode(', ', $unexpected))));
+      $this->assertTrue(FALSE, t('Unexpected operations were called: %unexpected.', array('%unexpected' => implode(', ', $unexpected))));
     }
     else {
-      $this->assertTrue(TRUE, 'No unexpected operations were called.');
+      $this->assertTrue(TRUE, t('No unexpected operations were called.'));
     }
   }
 }
diff --git a/core/modules/system/lib/Drupal/system/Tests/Lock/LockFunctionalTest.php b/core/modules/system/lib/Drupal/system/Tests/Lock/LockFunctionalTest.php
index 4683263..5dcef68 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Lock/LockFunctionalTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Lock/LockFunctionalTest.php
@@ -36,22 +36,22 @@ public function testBackendLockRelease() {
     $backend = lock();
 
     $success = $backend->acquire('lock_a');
-    $this->assertTrue($success, 'Could acquire first lock.');
+    $this->assertTrue($success, "Could acquire first lock");
 
     // This function is not part of the backend, but the default database
     // backend implement it, we can here use it safely.
     $is_free = $backend->lockMayBeAvailable('lock_a');
-    $this->assertFalse($is_free, 'First lock is unavailable.');
+    $this->assertFalse($is_free, "First lock is unavailable");
 
     $backend->release('lock_a');
     $is_free = $backend->lockMayBeAvailable('lock_a');
-    $this->assertTrue($is_free, 'First lock has been released.');
+    $this->assertTrue($is_free, "First lock has been released");
 
     $success = $backend->acquire('lock_b');
-    $this->assertTrue($success, 'Could acquire second lock.');
+    $this->assertTrue($success, "Could acquire second lock");
 
     $success = $backend->acquire('lock_b');
-    $this->assertTrue($success, 'Could acquire second lock a second time within the same request.');
+    $this->assertTrue($success, "Could acquire second lock a second time within the same request");
 
     $backend->release('lock_b');
   }
@@ -63,18 +63,18 @@ public function testBackendLockReleaseAll() {
     $backend = lock();
 
     $success = $backend->acquire('lock_a');
-    $this->assertTrue($success, 'Could acquire first lock.');
+    $this->assertTrue($success, "Could acquire first lock");
 
     $success = $backend->acquire('lock_b');
-    $this->assertTrue($success, 'Could acquire second lock.');
+    $this->assertTrue($success, "Could acquire second lock");
 
     $backend->releaseAll();
 
     $is_free = $backend->lockMayBeAvailable('lock_a');
-    $this->assertTrue($is_free, 'First lock has been released.');
+    $this->assertTrue($is_free, "First lock has been released");
 
     $is_free = $backend->lockMayBeAvailable('lock_b');
-    $this->assertTrue($is_free, 'Second lock has been released.');
+    $this->assertTrue($is_free, "Second lock has been released");
   }
 
   /**
@@ -83,34 +83,34 @@ public function testBackendLockReleaseAll() {
   public function testLockAcquire() {
     $lock_acquired = 'TRUE: Lock successfully acquired in system_test_lock_acquire()';
     $lock_not_acquired = 'FALSE: Lock not acquired in system_test_lock_acquire()';
-    $this->assertTrue(lock()->acquire('system_test_lock_acquire'), 'Lock acquired by this request.', 'Lock');
-    $this->assertTrue(lock()->acquire('system_test_lock_acquire'), 'Lock extended by this request.', 'Lock');
+    $this->assertTrue(lock()->acquire('system_test_lock_acquire'), t('Lock acquired by this request.'), t('Lock'));
+    $this->assertTrue(lock()->acquire('system_test_lock_acquire'), t('Lock extended by this request.'), t('Lock'));
     lock()->release('system_test_lock_acquire');
 
     // Cause another request to acquire the lock.
     $this->drupalGet('system-test/lock-acquire');
-    $this->assertText($lock_acquired, 'Lock acquired by the other request.', 'Lock');
+    $this->assertText($lock_acquired, t('Lock acquired by the other request.'), t('Lock'));
     // The other request has finished, thus it should have released its lock.
-    $this->assertTrue(lock()->acquire('system_test_lock_acquire'), 'Lock acquired by this request.', 'Lock');
+    $this->assertTrue(lock()->acquire('system_test_lock_acquire'), t('Lock acquired by this request.'), t('Lock'));
     // This request holds the lock, so the other request cannot acquire it.
     $this->drupalGet('system-test/lock-acquire');
-    $this->assertText($lock_not_acquired, 'Lock not acquired by the other request.', 'Lock');
+    $this->assertText($lock_not_acquired, t('Lock not acquired by the other request.'), t('Lock'));
     lock()->release('system_test_lock_acquire');
 
     // Try a very short timeout and lock breaking.
-    $this->assertTrue(lock()->acquire('system_test_lock_acquire', 0.5), 'Lock acquired by this request.', 'Lock');
+    $this->assertTrue(lock()->acquire('system_test_lock_acquire', 0.5), t('Lock acquired by this request.'), t('Lock'));
     sleep(1);
     // The other request should break our lock.
     $this->drupalGet('system-test/lock-acquire');
-    $this->assertText($lock_acquired, 'Lock acquired by the other request, breaking our lock.', 'Lock');
+    $this->assertText($lock_acquired, t('Lock acquired by the other request, breaking our lock.'), t('Lock'));
     // We cannot renew it, since the other thread took it.
-    $this->assertFalse(lock()->acquire('system_test_lock_acquire'), 'Lock cannot be extended by this request.', 'Lock');
+    $this->assertFalse(lock()->acquire('system_test_lock_acquire'), t('Lock cannot be extended by this request.'), t('Lock'));
 
     // Check the shut-down function.
     $lock_acquired_exit = 'TRUE: Lock successfully acquired in system_test_lock_exit()';
     $lock_not_acquired_exit = 'FALSE: Lock not acquired in system_test_lock_exit()';
     $this->drupalGet('system-test/lock-exit');
-    $this->assertText($lock_acquired_exit, 'Lock acquired by the other request before exit.', 'Lock');
-    $this->assertTrue(lock()->acquire('system_test_lock_exit'), 'Lock acquired by this request after the other request exits.', 'Lock');
+    $this->assertText($lock_acquired_exit, t('Lock acquired by the other request before exit.'), t('Lock'));
+    $this->assertTrue(lock()->acquire('system_test_lock_exit'), t('Lock acquired by this request after the other request exits.'), t('Lock'));
   }
 }
diff --git a/core/modules/system/lib/Drupal/system/Tests/Pager/PagerTest.php b/core/modules/system/lib/Drupal/system/Tests/Pager/PagerTest.php
index 190cccd..0804339 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Pager/PagerTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Pager/PagerTest.php
@@ -114,24 +114,24 @@ protected function assertPagerItems($current_page) {
 
     // Verify first/previous and next/last items and links.
     if (isset($first)) {
-      $this->assertClass($first, 'pager-first', 'Item for first page has .pager-first class.');
-      $this->assertTrue($first->a, 'Link to first page found.');
-      $this->assertNoClass($first->a, 'active', 'Link to first page is not active.');
+      $this->assertClass($first, 'pager-first', "Item for first page has .pager-first class.");
+      $this->assertTrue($first->a, "Link to first page found.");
+      $this->assertNoClass($first->a, 'active', "Link to first page is not active.");
     }
     if (isset($previous)) {
-      $this->assertClass($previous, 'pager-previous', 'Item for first page has .pager-previous class.');
-      $this->assertTrue($previous->a, 'Link to previous page found.');
-      $this->assertNoClass($previous->a, 'active', 'Link to previous page is not active.');
+      $this->assertClass($previous, 'pager-previous', "Item for first page has .pager-previous class.");
+      $this->assertTrue($previous->a, "Link to previous page found.");
+      $this->assertNoClass($previous->a, 'active', "Link to previous page is not active.");
     }
     if (isset($next)) {
-      $this->assertClass($next, 'pager-next', 'Item for next page has .pager-next class.');
-      $this->assertTrue($next->a, 'Link to next page found.');
-      $this->assertNoClass($next->a, 'active', 'Link to next page is not active.');
+      $this->assertClass($next, 'pager-next', "Item for next page has .pager-next class.");
+      $this->assertTrue($next->a, "Link to next page found.");
+      $this->assertNoClass($next->a, 'active', "Link to next page is not active.");
     }
     if (isset($last)) {
-      $this->assertClass($last, 'pager-last', 'Item for last page has .pager-last class.');
-      $this->assertTrue($last->a, 'Link to last page found.');
-      $this->assertNoClass($last->a, 'active', 'Link to last page is not active.');
+      $this->assertClass($last, 'pager-last', "Item for last page has .pager-last class.");
+      $this->assertTrue($last->a, "Link to last page found.");
+      $this->assertNoClass($last->a, 'active', "Link to last page is not active.");
     }
   }
 
diff --git a/core/modules/system/lib/Drupal/system/Tests/Path/LookupTest.php b/core/modules/system/lib/Drupal/system/Tests/Path/LookupTest.php
index e319b94..a90b5f4 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Path/LookupTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Path/LookupTest.php
@@ -36,8 +36,8 @@ function testDrupalLookupPath() {
       'alias' => 'foo',
     );
     path_save($path);
-    $this->assertEqual(drupal_lookup_path('alias', $path['source']), $path['alias'], 'Basic alias lookup works.');
-    $this->assertEqual(drupal_lookup_path('source', $path['alias']), $path['source'], 'Basic source lookup works.');
+    $this->assertEqual(drupal_lookup_path('alias', $path['source']), $path['alias'], t('Basic alias lookup works.'));
+    $this->assertEqual(drupal_lookup_path('source', $path['alias']), $path['source'], t('Basic source lookup works.'));
 
     // Create a language specific alias for the default language (English).
     $path = array(
@@ -46,8 +46,8 @@ function testDrupalLookupPath() {
       'langcode' => 'en',
     );
     path_save($path);
-    $this->assertEqual(drupal_lookup_path('alias', $path['source']), $path['alias'], 'English alias overrides language-neutral alias.');
-    $this->assertEqual(drupal_lookup_path('source', $path['alias']), $path['source'], 'English source overrides language-neutral source.');
+    $this->assertEqual(drupal_lookup_path('alias', $path['source']), $path['alias'], t('English alias overrides language-neutral alias.'));
+    $this->assertEqual(drupal_lookup_path('source', $path['alias']), $path['source'], t('English source overrides language-neutral source.'));
 
     // Create a language-neutral alias for the same path, again.
     $path = array(
@@ -55,7 +55,7 @@ function testDrupalLookupPath() {
       'alias' => 'bar',
     );
     path_save($path);
-    $this->assertEqual(drupal_lookup_path('alias', $path['source']), "users/$name", 'English alias still returned after entering a language-neutral alias.');
+    $this->assertEqual(drupal_lookup_path('alias', $path['source']), "users/$name", t('English alias still returned after entering a language-neutral alias.'));
 
     // Create a language-specific (xx-lolspeak) alias for the same path.
     $path = array(
@@ -64,9 +64,9 @@ function testDrupalLookupPath() {
       'langcode' => 'xx-lolspeak',
     );
     path_save($path);
-    $this->assertEqual(drupal_lookup_path('alias', $path['source']), "users/$name", 'English alias still returned after entering a LOLspeak alias.');
+    $this->assertEqual(drupal_lookup_path('alias', $path['source']), "users/$name", t('English alias still returned after entering a LOLspeak alias.'));
     // The LOLspeak alias should be returned if we really want LOLspeak.
-    $this->assertEqual(drupal_lookup_path('alias', $path['source'], 'xx-lolspeak'), 'LOL', 'LOLspeak alias returned if we specify xx-lolspeak to drupal_lookup_path().');
+    $this->assertEqual(drupal_lookup_path('alias', $path['source'], 'xx-lolspeak'), 'LOL', t('LOLspeak alias returned if we specify xx-lolspeak to drupal_lookup_path().'));
 
     // Create a new alias for this path in English, which should override the
     // previous alias for "user/$uid".
@@ -76,8 +76,8 @@ function testDrupalLookupPath() {
       'langcode' => 'en',
     );
     path_save($path);
-    $this->assertEqual(drupal_lookup_path('alias', $path['source']), $path['alias'], 'Recently created English alias returned.');
-    $this->assertEqual(drupal_lookup_path('source', $path['alias']), $path['source'], 'Recently created English source returned.');
+    $this->assertEqual(drupal_lookup_path('alias', $path['source']), $path['alias'], t('Recently created English alias returned.'));
+    $this->assertEqual(drupal_lookup_path('source', $path['alias']), $path['source'], t('Recently created English source returned.'));
 
     // Remove the English aliases, which should cause a fallback to the most
     // recently created language-neutral alias, 'bar'.
@@ -85,7 +85,7 @@ function testDrupalLookupPath() {
       ->condition('langcode', 'en')
       ->execute();
     drupal_clear_path_cache();
-    $this->assertEqual(drupal_lookup_path('alias', $path['source']), 'bar', 'Path lookup falls back to recently created language-neutral alias.');
+    $this->assertEqual(drupal_lookup_path('alias', $path['source']), 'bar', t('Path lookup falls back to recently created language-neutral alias.'));
 
     // Test the situation where the alias and language are the same, but
     // the source differs. The newer alias record should be returned.
@@ -95,6 +95,6 @@ function testDrupalLookupPath() {
       'alias' => 'bar',
     );
     path_save($path);
-    $this->assertEqual(drupal_lookup_path('source', $path['alias']), $path['source'], 'Newer alias record is returned when comparing two LANGUAGE_NOT_SPECIFIED paths with the same alias.');
+    $this->assertEqual(drupal_lookup_path('source', $path['alias']), $path['source'], t('Newer alias record is returned when comparing two LANGUAGE_NOT_SPECIFIED paths with the same alias.'));
   }
 }
diff --git a/core/modules/system/lib/Drupal/system/Tests/Path/MatchPathTest.php b/core/modules/system/lib/Drupal/system/Tests/Path/MatchPathTest.php
index 15af3b6..a5cbfee 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Path/MatchPathTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Path/MatchPathTest.php
@@ -45,7 +45,7 @@ function testDrupalMatchPath() {
     foreach ($tests as $patterns => $cases) {
       foreach ($cases as $path => $expected_result) {
         $actual_result = drupal_match_path($path, $patterns);
-        $this->assertIdentical($actual_result, $expected_result, format_string('Tried matching the path <code>@path</code> to the pattern <pre>@patterns</pre> - expected @expected, got @actual.', array('@path' => $path, '@patterns' => $patterns, '@expected' => var_export($expected_result, TRUE), '@actual' => var_export($actual_result, TRUE))));
+        $this->assertIdentical($actual_result, $expected_result, t('Tried matching the path <code>@path</code> to the pattern <pre>@patterns</pre> - expected @expected, got @actual.', array('@path' => $path, '@patterns' => $patterns, '@expected' => var_export($expected_result, TRUE), '@actual' => var_export($actual_result, TRUE))));
       }
     }
   }
diff --git a/core/modules/system/lib/Drupal/system/Tests/Path/SaveTest.php b/core/modules/system/lib/Drupal/system/Tests/Path/SaveTest.php
index b95893a..f017230 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Path/SaveTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Path/SaveTest.php
@@ -57,7 +57,7 @@ function testDrupalSaveOriginalPath() {
     // Test to see if the original alias is available to modules during
     // hook_path_update().
     $results = variable_get('path_test_results', array());
-    $this->assertIdentical($results['hook_path_update']['original']['alias'], $path_original['alias'], 'Old path alias available to modules during hook_path_update.');
-    $this->assertIdentical($results['hook_path_update']['original']['source'], $path_original['source'], 'Old path alias available to modules during hook_path_update.');
+    $this->assertIdentical($results['hook_path_update']['original']['alias'], $path_original['alias'], t('Old path alias available to modules during hook_path_update.'));
+    $this->assertIdentical($results['hook_path_update']['original']['source'], $path_original['source'], t('Old path alias available to modules during hook_path_update.'));
   }
 }
diff --git a/core/modules/system/lib/Drupal/system/Tests/Path/UrlAlterFunctionalTest.php b/core/modules/system/lib/Drupal/system/Tests/Path/UrlAlterFunctionalTest.php
index 72091e5..6bcbca8 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Path/UrlAlterFunctionalTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Path/UrlAlterFunctionalTest.php
@@ -83,8 +83,8 @@ function testUrlAlter() {
    */
   function testCurrentUrlRequestedPath() {
     $this->drupalGet('url-alter-test/bar');
-    $this->assertRaw('request_path=url-alter-test/bar', 'request_path() returns the requested path.');
-    $this->assertRaw('current_path=url-alter-test/foo', 'current_path() returns the internal path.');
+    $this->assertRaw('request_path=url-alter-test/bar', t('request_path() returns the requested path.'));
+    $this->assertRaw('current_path=url-alter-test/foo', t('current_path() returns the internal path.'));
   }
 
   /**
@@ -92,7 +92,7 @@ function testCurrentUrlRequestedPath() {
    */
   function testGetQInitialized() {
     $this->drupalGet('');
-    $this->assertText("current_path() is non-empty with an empty request path.", 'current_path() is initialized with an empty request path.');
+    $this->assertText("current_path() is non-empty with an empty request path.", "current_path() is initialized with an empty request path.");
   }
 
   /**
@@ -110,7 +110,7 @@ protected function assertUrlOutboundAlter($original, $final) {
     $result = url($original);
     $base_path = base_path() . $GLOBALS['script_path'];
     $result = substr($result, strlen($base_path));
-    $this->assertIdentical($result, $final, format_string('Altered outbound URL %original, expected %final, and got %result.', array('%original' => $original, '%final' => $final, '%result' => $result)));
+    $this->assertIdentical($result, $final, t('Altered outbound URL %original, expected %final, and got %result.', array('%original' => $original, '%final' => $final, '%result' => $result)));
   }
 
   /**
@@ -127,6 +127,6 @@ protected function assertUrlOutboundAlter($original, $final) {
   protected function assertUrlInboundAlter($original, $final) {
     // Test inbound altering.
     $result = drupal_get_normal_path($original);
-    $this->assertIdentical($result, $final, format_string('Altered inbound URL %original, expected %final, and got %result.', array('%original' => $original, '%final' => $final, '%result' => $result)));
+    $this->assertIdentical($result, $final, t('Altered inbound URL %original, expected %final, and got %result.', array('%original' => $original, '%final' => $final, '%result' => $result)));
   }
 }
diff --git a/core/modules/system/lib/Drupal/system/Tests/Queue/QueueTest.php b/core/modules/system/lib/Drupal/system/Tests/Queue/QueueTest.php
index 5767587..9e824dc 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Queue/QueueTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Queue/QueueTest.php
@@ -79,14 +79,14 @@ protected function queueTest($queue1, $queue2) {
     $new_items[] = $item->data;
 
     // First two dequeued items should match the first two items we queued.
-    $this->assertEqual($this->queueScore($data, $new_items), 2, 'Two items matched');
+    $this->assertEqual($this->queueScore($data, $new_items), 2, t('Two items matched'));
 
     // Add two more items.
     $queue1->createItem($data[2]);
     $queue1->createItem($data[3]);
 
-    $this->assertTrue($queue1->numberOfItems(), 'Queue 1 is not empty after adding items.');
-    $this->assertFalse($queue2->numberOfItems(), 'Queue 2 is empty while Queue 1 has items');
+    $this->assertTrue($queue1->numberOfItems(), t('Queue 1 is not empty after adding items.'));
+    $this->assertFalse($queue2->numberOfItems(), t('Queue 2 is empty while Queue 1 has items'));
 
     $items[] = $item = $queue1->claimItem();
     $new_items[] = $item->data;
@@ -96,10 +96,10 @@ protected function queueTest($queue1, $queue2) {
 
     // All dequeued items should match the items we queued exactly once,
     // therefore the score must be exactly 4.
-    $this->assertEqual($this->queueScore($data, $new_items), 4, 'Four items matched');
+    $this->assertEqual($this->queueScore($data, $new_items), 4, t('Four items matched'));
 
     // There should be no duplicate items.
-    $this->assertEqual($this->queueScore($new_items, $new_items), 4, 'Four items matched');
+    $this->assertEqual($this->queueScore($new_items, $new_items), 4, t('Four items matched'));
 
     // Delete all items from queue1.
     foreach ($items as $item) {
@@ -107,8 +107,8 @@ protected function queueTest($queue1, $queue2) {
     }
 
     // Check that both queues are empty.
-    $this->assertFalse($queue1->numberOfItems(), 'Queue 1 is empty');
-    $this->assertFalse($queue2->numberOfItems(), 'Queue 2 is empty');
+    $this->assertFalse($queue1->numberOfItems(), t('Queue 1 is empty'));
+    $this->assertFalse($queue2->numberOfItems(), t('Queue 2 is empty'));
   }
 
   /**
diff --git a/core/modules/system/lib/Drupal/system/Tests/Routing/UrlGeneratorTest.php b/core/modules/system/lib/Drupal/system/Tests/Routing/UrlGeneratorTest.php
new file mode 100644
index 0000000..acf79fc
--- /dev/null
+++ b/core/modules/system/lib/Drupal/system/Tests/Routing/UrlGeneratorTest.php
@@ -0,0 +1,128 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\system\Tests\Routing\UrlGeneratorTest.php
+ */
+
+namespace Drupal\system\Tests\Routing;
+
+use Symfony\Component\HttpFoundation\Request;
+use Symfony\Component\Routing\Route;
+use Symfony\Component\Routing\RouteCollection;
+use Symfony\Component\Routing\Exception\ResourceNotFoundException;
+
+use Drupal\simpletest\UnitTestBase;
+use Drupal\Core\Routing\DrupalUrlGenerator;
+use Drupal\Core\Database\Database;
+use Drupal\Core\Routing\MatcherDumper;
+
+use Exception;
+
+/**
+ * Basic tests for the DrupalUrlGenerator.
+ */
+class UrlGeneratorTest extends UnitTestBase {
+
+  /**
+   * A collection of shared fixture data for tests.
+   *
+   * @var RoutingFixtures
+   */
+  protected $fixtures;
+
+  public static function getInfo() {
+    return array(
+      'name' => 'URL generator tests',
+      'description' => 'Confirm that the url generation code is working correctly.',
+      'group' => 'Routing',
+    );
+  }
+
+  function __construct($test_id = NULL) {
+    parent::__construct($test_id);
+
+     $this->fixtures = new MyRoutingFixtures();
+  }
+
+  public function tearDown() {
+    $this->fixtures->dropTables(Database::getConnection());
+
+    parent::tearDown();
+  }
+
+  /**
+   * Confirms correct URL generation for a simple sample RouteCollection
+   */
+  function testSampleUrlGeneration() {
+    $connection = Database::getConnection();
+    $this->fixtures->createTables($connection);
+
+    $dumper = new MatcherDumper($connection);
+    $sampleRoutes = $this->fixtures->sampleRouteCollection();
+    $dumper->addRoutes($sampleRoutes);
+    $dumper->dump();
+
+    $generator = new DrupalUrlGenerator();
+
+    foreach ($sampleRoutes->all() as $name => $route) {
+      $url = $generator->generate($name);
+      $this->assertEqual($route->getPattern(), $url, 'Checking path generation for '. $name);
+    }
+  }
+
+  /**
+   * Confirms correct URL generation for a more complex RouteCollection
+   */
+  function testComplexUrlGeneration() {
+    $connection = Database::getConnection();
+    $this->fixtures->createTables($connection);
+
+    $dumper = new MatcherDumper($connection);
+    $sampleRoutes = $this->fixtures->complexRouteCollection();
+    $dumper->addRoutes($sampleRoutes);
+    $dumper->dump();
+
+    $generator = new DrupalUrlGenerator();
+
+    $sampleArgs = array('foo', 'bar', 'baz');
+
+    foreach ($sampleRoutes->all() as $name => $route) {
+      $pattern = $route->getPattern();
+
+      //constructing the expected URL by pattern matching
+      $expected_url = $pattern;
+      $parameters = array();
+      preg_match_all('/\{(.+?)\}/', $pattern, $placeholders);
+      foreach ($placeholders[1] as $idx => $placeholder_name) {
+        $expected_url = preg_replace('/\{' . $placeholder_name . '\}/', $sampleArgs[$idx], $expected_url);
+        $parameters[$placeholder_name] = $sampleArgs[$idx];
+      }
+
+      $url = $generator->generate($name, $parameters);
+      $this->assertEqual($expected_url, $url, 'Checking path generation for '. $name);
+    }
+  }
+}
+
+
+// RoutingFixtures::routingTableDefinition() hardcodes a table definition called
+// 'test_routes', but I need a table called 'router', which the UrlGenerator is
+// hitting while generating URLs. Quick and hacky workaround.
+use Drupal\Core\Database\Connection;
+
+class MyRoutingFixtures extends RoutingFixtures {
+
+  public function createTables(Connection $connection) {
+    $tables = $this->routingTableDefinition();
+    $tables['router'] = $tables['test_routes'];
+    unset($tables['test_routes']);
+
+    $schema = $connection->schema();
+
+    foreach ($tables as $name => $table) {
+      $schema->dropTable($name);
+      $schema->createTable($name, $table);
+    }
+  }
+}
diff --git a/core/modules/system/lib/Drupal/system/Tests/Session/SessionTest.php b/core/modules/system/lib/Drupal/system/Tests/Session/SessionTest.php
index 02503f7..0abefb5 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Session/SessionTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Session/SessionTest.php
@@ -30,11 +30,11 @@ public static function getInfo() {
    * Tests for drupal_save_session() and drupal_session_regenerate().
    */
   function testSessionSaveRegenerate() {
-    $this->assertFalse(drupal_save_session(),'drupal_save_session() correctly returns FALSE (inside of testing framework) when initially called with no arguments.', t('Session'));
-    $this->assertFalse(drupal_save_session(FALSE), 'drupal_save_session() correctly returns FALSE when called with FALSE.', t('Session'));
-    $this->assertFalse(drupal_save_session(), 'drupal_save_session() correctly returns FALSE when saving has been disabled.', t('Session'));
-    $this->assertTrue(drupal_save_session(TRUE), 'drupal_save_session() correctly returns TRUE when called with TRUE.', t('Session'));
-    $this->assertTrue(drupal_save_session(), 'drupal_save_session() correctly returns TRUE when saving has been enabled.', t('Session'));
+    $this->assertFalse(drupal_save_session(), t('drupal_save_session() correctly returns FALSE (inside of testing framework) when initially called with no arguments.'), t('Session'));
+    $this->assertFalse(drupal_save_session(FALSE), t('drupal_save_session() correctly returns FALSE when called with FALSE.'), t('Session'));
+    $this->assertFalse(drupal_save_session(), t('drupal_save_session() correctly returns FALSE when saving has been disabled.'), t('Session'));
+    $this->assertTrue(drupal_save_session(TRUE), t('drupal_save_session() correctly returns TRUE when called with TRUE.'), t('Session'));
+    $this->assertTrue(drupal_save_session(), t('drupal_save_session() correctly returns TRUE when saving has been enabled.'), t('Session'));
 
     // Test session hardening code from SA-2008-044.
     $user = $this->drupalCreateUser(array('access content'));
@@ -44,7 +44,7 @@ function testSessionSaveRegenerate() {
 
     // Make sure the session cookie is set as HttpOnly.
     $this->drupalLogin($user);
-    $this->assertTrue(preg_match('/HttpOnly/i', $this->drupalGetHeader('Set-Cookie', TRUE)), 'Session cookie is set as HttpOnly.');
+    $this->assertTrue(preg_match('/HttpOnly/i', $this->drupalGetHeader('Set-Cookie', TRUE)), t('Session cookie is set as HttpOnly.'));
     $this->drupalLogout();
 
     // Verify that the session is regenerated if a module calls exit
@@ -54,7 +54,7 @@ function testSessionSaveRegenerate() {
     $this->drupalGet('session-test/id');
     $matches = array();
     preg_match('/\s*session_id:(.*)\n/', $this->drupalGetContent(), $matches);
-    $this->assertTrue(!empty($matches[1]) , 'Found session ID before logging in.');
+    $this->assertTrue(!empty($matches[1]) , t('Found session ID before logging in.'));
     $original_session = $matches[1];
 
     // We cannot use $this->drupalLogin($user); because we exit in
@@ -65,14 +65,14 @@ function testSessionSaveRegenerate() {
     );
     $this->drupalPost('user', $edit, t('Log in'));
     $this->drupalGet('user');
-    $pass = $this->assertText($user->name, format_string('Found name: %name', array('%name' => $user->name)), t('User login'));
+    $pass = $this->assertText($user->name, t('Found name: %name', array('%name' => $user->name)), t('User login'));
     $this->_logged_in = $pass;
 
     $this->drupalGet('session-test/id');
     $matches = array();
     preg_match('/\s*session_id:(.*)\n/', $this->drupalGetContent(), $matches);
-    $this->assertTrue(!empty($matches[1]) , 'Found session ID after logging in.');
-    $this->assertTrue($matches[1] != $original_session, 'Session ID changed after login.');
+    $this->assertTrue(!empty($matches[1]) , t('Found session ID after logging in.'));
+    $this->assertTrue($matches[1] != $original_session, t('Session ID changed after login.'));
   }
 
   /**
@@ -88,48 +88,48 @@ function testDataPersistence() {
 
     $value_1 = $this->randomName();
     $this->drupalGet('session-test/set/' . $value_1);
-    $this->assertText($value_1, 'The session value was stored.', t('Session'));
+    $this->assertText($value_1, t('The session value was stored.'), t('Session'));
     $this->drupalGet('session-test/get');
-    $this->assertText($value_1, 'Session correctly returned the stored data for an authenticated user.', t('Session'));
+    $this->assertText($value_1, t('Session correctly returned the stored data for an authenticated user.'), t('Session'));
 
     // Attempt to write over val_1. If drupal_save_session(FALSE) is working.
     // properly, val_1 will still be set.
     $value_2 = $this->randomName();
     $this->drupalGet('session-test/no-set/' . $value_2);
-    $this->assertText($value_2, 'The session value was correctly passed to session-test/no-set.', t('Session'));
+    $this->assertText($value_2, t('The session value was correctly passed to session-test/no-set.'), t('Session'));
     $this->drupalGet('session-test/get');
-    $this->assertText($value_1, 'Session data is not saved for drupal_save_session(FALSE).', t('Session'));
+    $this->assertText($value_1, t('Session data is not saved for drupal_save_session(FALSE).'), t('Session'));
 
     // Switch browser cookie to anonymous user, then back to user 1.
     $this->sessionReset();
     $this->sessionReset($user->uid);
-    $this->assertText($value_1, 'Session data persists through browser close.', t('Session'));
+    $this->assertText($value_1, t('Session data persists through browser close.'), t('Session'));
 
     // Logout the user and make sure the stored value no longer persists.
     $this->drupalLogout();
     $this->sessionReset();
     $this->drupalGet('session-test/get');
-    $this->assertNoText($value_1, "After logout, previous user's session data is not available.", t('Session'));
+    $this->assertNoText($value_1, t("After logout, previous user's session data is not available."), t('Session'));
 
     // Now try to store some data as an anonymous user.
     $value_3 = $this->randomName();
     $this->drupalGet('session-test/set/' . $value_3);
-    $this->assertText($value_3, 'Session data stored for anonymous user.', t('Session'));
+    $this->assertText($value_3, t('Session data stored for anonymous user.'), t('Session'));
     $this->drupalGet('session-test/get');
-    $this->assertText($value_3, 'Session correctly returned the stored data for an anonymous user.', t('Session'));
+    $this->assertText($value_3, t('Session correctly returned the stored data for an anonymous user.'), t('Session'));
 
     // Try to store data when drupal_save_session(FALSE).
     $value_4 = $this->randomName();
     $this->drupalGet('session-test/no-set/' . $value_4);
-    $this->assertText($value_4, 'The session value was correctly passed to session-test/no-set.', t('Session'));
+    $this->assertText($value_4, t('The session value was correctly passed to session-test/no-set.'), t('Session'));
     $this->drupalGet('session-test/get');
-    $this->assertText($value_3, 'Session data is not saved for drupal_save_session(FALSE).', t('Session'));
+    $this->assertText($value_3, t('Session data is not saved for drupal_save_session(FALSE).'), t('Session'));
 
     // Login, the data should persist.
     $this->drupalLogin($user);
     $this->sessionReset($user->uid);
     $this->drupalGet('session-test/get');
-    $this->assertNoText($value_1, 'Session has persisted for an authenticated user after logging out and then back in.', t('Session'));
+    $this->assertNoText($value_1, t('Session has persisted for an authenticated user after logging out and then back in.'), t('Session'));
 
     // Change session and create another user.
     $user2 = $this->drupalCreateUser(array('access content'));
@@ -153,29 +153,29 @@ function testEmptyAnonymousSession() {
     $this->drupalGet('');
     $this->assertSessionCookie(FALSE);
     $this->assertSessionEmpty(TRUE);
-    $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'MISS', 'Page was not cached.');
+    $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'MISS', t('Page was not cached.'));
 
     // Start a new session by setting a message.
     $this->drupalGet('session-test/set-message');
     $this->assertSessionCookie(TRUE);
-    $this->assertTrue($this->drupalGetHeader('Set-Cookie'), 'New session was started.');
+    $this->assertTrue($this->drupalGetHeader('Set-Cookie'), t('New session was started.'));
 
     // Display the message, during the same request the session is destroyed
     // and the session cookie is unset.
     $this->drupalGet('');
     $this->assertSessionCookie(FALSE);
     $this->assertSessionEmpty(FALSE);
-    $this->assertFalse($this->drupalGetHeader('X-Drupal-Cache'), 'Caching was bypassed.');
-    $this->assertText(t('This is a dummy message.'), 'Message was displayed.');
-    $this->assertTrue(preg_match('/SESS\w+=deleted/', $this->drupalGetHeader('Set-Cookie')), 'Session cookie was deleted.');
+    $this->assertFalse($this->drupalGetHeader('X-Drupal-Cache'), t('Caching was bypassed.'));
+    $this->assertText(t('This is a dummy message.'), t('Message was displayed.'));
+    $this->assertTrue(preg_match('/SESS\w+=deleted/', $this->drupalGetHeader('Set-Cookie')), t('Session cookie was deleted.'));
 
     // Verify that session was destroyed.
     $this->drupalGet('');
     $this->assertSessionCookie(FALSE);
     $this->assertSessionEmpty(TRUE);
-    $this->assertNoText(t('This is a dummy message.'), 'Message was not cached.');
-    $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'HIT', 'Page was cached.');
-    $this->assertFalse($this->drupalGetHeader('Set-Cookie'), 'New session was not started.');
+    $this->assertNoText(t('This is a dummy message.'), t('Message was not cached.'));
+    $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'HIT', t('Page was cached.'));
+    $this->assertFalse($this->drupalGetHeader('Set-Cookie'), t('New session was not started.'));
 
     // Verify that no session is created if drupal_save_session(FALSE) is called.
     $this->drupalGet('session-test/set-message-but-dont-save');
@@ -186,7 +186,7 @@ function testEmptyAnonymousSession() {
     $this->drupalGet('');
     $this->assertSessionCookie(FALSE);
     $this->assertSessionEmpty(TRUE);
-    $this->assertNoText(t('This is a dummy message.'), 'The message was not saved.');
+    $this->assertNoText(t('This is a dummy message.'), t('The message was not saved.'));
   }
 
   /**
@@ -206,29 +206,29 @@ function testSessionWrite() {
     sleep(1);
     $this->drupalGet('session-test/set/foo');
     $times2 = db_query($sql, array(':uid' => $user->uid))->fetchObject();
-    $this->assertEqual($times2->access, $times1->access, 'Users table was not updated.');
-    $this->assertNotEqual($times2->timestamp, $times1->timestamp, 'Sessions table was updated.');
+    $this->assertEqual($times2->access, $times1->access, t('Users table was not updated.'));
+    $this->assertNotEqual($times2->timestamp, $times1->timestamp, t('Sessions table was updated.'));
 
     // Write the same value again, i.e. do not modify the session.
     sleep(1);
     $this->drupalGet('session-test/set/foo');
     $times3 = db_query($sql, array(':uid' => $user->uid))->fetchObject();
-    $this->assertEqual($times3->access, $times1->access, 'Users table was not updated.');
-    $this->assertEqual($times3->timestamp, $times2->timestamp, 'Sessions table was not updated.');
+    $this->assertEqual($times3->access, $times1->access, t('Users table was not updated.'));
+    $this->assertEqual($times3->timestamp, $times2->timestamp, t('Sessions table was not updated.'));
 
     // Do not change the session.
     sleep(1);
     $this->drupalGet('');
     $times4 = db_query($sql, array(':uid' => $user->uid))->fetchObject();
-    $this->assertEqual($times4->access, $times3->access, 'Users table was not updated.');
-    $this->assertEqual($times4->timestamp, $times3->timestamp, 'Sessions table was not updated.');
+    $this->assertEqual($times4->access, $times3->access, t('Users table was not updated.'));
+    $this->assertEqual($times4->timestamp, $times3->timestamp, t('Sessions table was not updated.'));
 
     // Force updating of users and sessions table once per second.
     variable_set('session_write_interval', 0);
     $this->drupalGet('');
     $times5 = db_query($sql, array(':uid' => $user->uid))->fetchObject();
-    $this->assertNotEqual($times5->access, $times4->access, 'Users table was updated.');
-    $this->assertNotEqual($times5->timestamp, $times4->timestamp, 'Sessions table was updated.');
+    $this->assertNotEqual($times5->access, $times4->access, t('Users table was updated.'));
+    $this->assertNotEqual($times5->timestamp, $times4->timestamp, t('Sessions table was updated.'));
   }
 
   /**
@@ -238,7 +238,7 @@ function testEmptySessionID() {
     $user = $this->drupalCreateUser(array('access content'));
     $this->drupalLogin($user);
     $this->drupalGet('session-test/is-logged-in');
-    $this->assertResponse(200, 'User is logged in.');
+    $this->assertResponse(200, t('User is logged in.'));
 
     // Reset the sid in {sessions} to a blank string. This may exist in the
     // wild in some cases, although we normally prevent it from happening.
@@ -249,10 +249,10 @@ function testEmptySessionID() {
     $this->curlClose();
     $this->additionalCurlOptions[CURLOPT_COOKIE] = rawurlencode($this->session_name) . '=;';
     $this->drupalGet('session-test/id-from-cookie');
-    $this->assertRaw("session_id:\n", 'Session ID is blank as sent from cookie header.');
+    $this->assertRaw("session_id:\n", t('Session ID is blank as sent from cookie header.'));
     // Assert that we have an anonymous session now.
     $this->drupalGet('session-test/is-logged-in');
-    $this->assertResponse(403, 'An empty session ID is not allowed.');
+    $this->assertResponse(403, t('An empty session ID is not allowed.'));
   }
 
   /**
@@ -270,7 +270,7 @@ function sessionReset($uid = 0) {
     $this->additionalCurlOptions[CURLOPT_COOKIEFILE] = $this->cookieFile;
     $this->additionalCurlOptions[CURLOPT_COOKIESESSION] = TRUE;
     $this->drupalGet('session-test/get');
-    $this->assertResponse(200, 'Session test module is correctly enabled.', t('Session'));
+    $this->assertResponse(200, t('Session test module is correctly enabled.'), t('Session'));
   }
 
   /**
@@ -278,10 +278,10 @@ function sessionReset($uid = 0) {
    */
   function assertSessionCookie($sent) {
     if ($sent) {
-      $this->assertNotNull($this->session_id, 'Session cookie was sent.');
+      $this->assertNotNull($this->session_id, t('Session cookie was sent.'));
     }
     else {
-      $this->assertNull($this->session_id, 'Session cookie was not sent.');
+      $this->assertNull($this->session_id, t('Session cookie was not sent.'));
     }
   }
 
@@ -290,10 +290,10 @@ function assertSessionCookie($sent) {
    */
   function assertSessionEmpty($empty) {
     if ($empty) {
-      $this->assertIdentical($this->drupalGetHeader('X-Session-Empty'), '1', 'Session was empty.');
+      $this->assertIdentical($this->drupalGetHeader('X-Session-Empty'), '1', t('Session was empty.'));
     }
     else {
-      $this->assertIdentical($this->drupalGetHeader('X-Session-Empty'), '0', 'Session was not empty.');
+      $this->assertIdentical($this->drupalGetHeader('X-Session-Empty'), '0', t('Session was not empty.'));
     }
   }
 }
diff --git a/core/modules/tracker/lib/Drupal/tracker/Tests/TrackerTest.php b/core/modules/tracker/lib/Drupal/tracker/Tests/TrackerTest.php
index 0473d38..7cd99cc 100644
--- a/core/modules/tracker/lib/Drupal/tracker/Tests/TrackerTest.php
+++ b/core/modules/tracker/lib/Drupal/tracker/Tests/TrackerTest.php
@@ -72,14 +72,14 @@ function testTrackerAll() {
     ));
 
     $this->drupalGet('tracker');
-    $this->assertNoText($unpublished->label(), 'Unpublished node do not show up in the tracker listing.');
-    $this->assertText($published->label(), 'Published node show up in the tracker listing.');
-    $this->assertLink(t('My recent content'), 0, 'User tab shows up on the global tracker page.');
+    $this->assertNoText($unpublished->label(), t('Unpublished node do not show up in the tracker listing.'));
+    $this->assertText($published->label(), t('Published node show up in the tracker listing.'));
+    $this->assertLink(t('My recent content'), 0, t('User tab shows up on the global tracker page.'));
 
     // Delete a node and ensure it no longer appears on the tracker.
     node_delete($published->nid);
     $this->drupalGet('tracker');
-    $this->assertNoText($published->label(), 'Deleted node do not show up in the tracker listing.');
+    $this->assertNoText($published->label(), t('Deleted node do not show up in the tracker listing.'));
   }
 
   /**
@@ -115,10 +115,10 @@ function testTrackerUser() {
     $this->drupalPost('comment/reply/' . $other_published_my_comment->nid, $comment, t('Save'));
 
     $this->drupalGet('user/' . $this->user->uid . '/track');
-    $this->assertNoText($unpublished->label(), "Unpublished nodes do not show up in the users's tracker listing.");
-    $this->assertText($my_published->label(), "Published nodes show up in the user's tracker listing.");
-    $this->assertNoText($other_published_no_comment->label(), "Other user's nodes do not show up in the user's tracker listing.");
-    $this->assertText($other_published_my_comment->label(), "Nodes that the user has commented on appear in the user's tracker listing.");
+    $this->assertNoText($unpublished->label(), t("Unpublished nodes do not show up in the users's tracker listing."));
+    $this->assertText($my_published->label(), t("Published nodes show up in the user's tracker listing."));
+    $this->assertNoText($other_published_no_comment->label(), t("Other user's nodes do not show up in the user's tracker listing."));
+    $this->assertText($other_published_my_comment->label(), t("Nodes that the user has commented on appear in the user's tracker listing."));
 
     // Verify that unpublished comments are removed from the tracker.
     $admin_user = $this->drupalCreateUser(array('post comments', 'administer comments', 'access user profiles'));
@@ -141,19 +141,19 @@ function testTrackerNewNodes() {
     $node = $this->drupalCreateNode($edit);
     $title = $edit['title'];
     $this->drupalGet('tracker');
-    $this->assertPattern('/' . $title . '.*new/', 'New nodes are flagged as such in the tracker listing.');
+    $this->assertPattern('/' . $title . '.*new/', t('New nodes are flagged as such in the tracker listing.'));
 
     $this->drupalGet('node/' . $node->nid);
     $this->drupalGet('tracker');
-    $this->assertNoPattern('/' . $title . '.*new/', 'Visited nodes are not flagged as new.');
+    $this->assertNoPattern('/' . $title . '.*new/', t('Visited nodes are not flagged as new.'));
 
     $this->drupalLogin($this->other_user);
     $this->drupalGet('tracker');
-    $this->assertPattern('/' . $title . '.*new/', 'For another user, new nodes are flagged as such in the tracker listing.');
+    $this->assertPattern('/' . $title . '.*new/', t('For another user, new nodes are flagged as such in the tracker listing.'));
 
     $this->drupalGet('node/' . $node->nid);
     $this->drupalGet('tracker');
-    $this->assertNoPattern('/' . $title . '.*new/', 'For another user, visited nodes are not flagged as new.');
+    $this->assertNoPattern('/' . $title . '.*new/', t('For another user, visited nodes are not flagged as new.'));
   }
 
   /**
@@ -177,7 +177,7 @@ function testTrackerNewComments() {
 
     $this->drupalLogin($this->other_user);
     $this->drupalGet('tracker');
-    $this->assertText('1 new', 'New comments are counted on the tracker listing pages.');
+    $this->assertText('1 new', t('New comments are counted on the tracker listing pages.'));
     $this->drupalGet('node/' . $node->nid);
 
     // Add another comment as other_user.
@@ -192,7 +192,7 @@ function testTrackerNewComments() {
 
     $this->drupalLogin($this->user);
     $this->drupalGet('tracker');
-    $this->assertText('1 new', 'New comments are counted on the tracker listing pages.');
+    $this->assertText('1 new', t('New comments are counted on the tracker listing pages.'));
   }
 
   /**
@@ -237,19 +237,19 @@ function testTrackerCronIndexing() {
 
     // Assert that all node titles are displayed.
     foreach ($nodes as $i => $node) {
-      $this->assertText($node->label(), format_string('Node @i is displayed on the tracker listing pages.', array('@i' => $i)));
+      $this->assertText($node->label(), t('Node @i is displayed on the tracker listing pages.', array('@i' => $i)));
     }
-    $this->assertText('1 new', 'New comment is counted on the tracker listing pages.');
-    $this->assertText('updated', 'Node is listed as updated');
+    $this->assertText('1 new', t('New comment is counted on the tracker listing pages.'));
+    $this->assertText('updated', t('Node is listed as updated'));
 
     // Fetch the site-wide tracker.
     $this->drupalGet('tracker');
 
     // Assert that all node titles are displayed.
     foreach ($nodes as $i => $node) {
-      $this->assertText($node->label(), format_string('Node @i is displayed on the tracker listing pages.', array('@i' => $i)));
+      $this->assertText($node->label(), t('Node @i is displayed on the tracker listing pages.', array('@i' => $i)));
     }
-    $this->assertText('1 new', 'New comment is counted on the tracker listing pages.');
+    $this->assertText('1 new', t('New comment is counted on the tracker listing pages.'));
   }
 
   /**
@@ -266,7 +266,7 @@ function testTrackerAdminUnpublish() {
 
     // Assert that the node is displayed.
     $this->drupalGet('tracker');
-    $this->assertText($node->label(), 'Node is displayed on the tracker listing pages.');
+    $this->assertText($node->label(), t('Node is displayed on the tracker listing pages.'));
 
     // Unpublish the node and ensure that it's no longer displayed.
     $edit = array(
@@ -276,6 +276,6 @@ function testTrackerAdminUnpublish() {
     $this->drupalPost('admin/content', $edit, t('Update'));
 
     $this->drupalGet('tracker');
-    $this->assertText(t('No content available.'), 'Node is displayed on the tracker listing pages.');
+    $this->assertText(t('No content available.'), t('Node is displayed on the tracker listing pages.'));
   }
 }
diff --git a/core/modules/update/lib/Drupal/update/Tests/UpdateContribTest.php b/core/modules/update/lib/Drupal/update/Tests/UpdateContribTest.php
index af7d035..4f51883 100644
--- a/core/modules/update/lib/Drupal/update/Tests/UpdateContribTest.php
+++ b/core/modules/update/lib/Drupal/update/Tests/UpdateContribTest.php
@@ -86,7 +86,7 @@ function testUpdateContribBasic() {
     $this->assertText(t('Up to date'));
     $this->assertRaw('<h3>' . t('Modules') . '</h3>');
     $this->assertNoText(t('Update available'));
-    $this->assertRaw(l(t('AAA Update test'), 'http://example.com/project/aaa_update_test'), 'Link to aaa_update_test project appears.');
+    $this->assertRaw(l(t('AAA Update test'), 'http://example.com/project/aaa_update_test'), t('Link to aaa_update_test project appears.'));
   }
 
   /**
@@ -147,10 +147,10 @@ function testUpdateContribOrder() {
     $this->assertText(t('CCC Update test'));
     // We want aaa_update_test included in the ccc_update_test project, not as
     // its own project on the report.
-    $this->assertNoRaw(l(t('AAA Update test'), 'http://example.com/project/aaa_update_test'), 'Link to aaa_update_test project does not appear.');
+    $this->assertNoRaw(l(t('AAA Update test'), 'http://example.com/project/aaa_update_test'), t('Link to aaa_update_test project does not appear.'));
     // The other two should be listed as projects.
-    $this->assertRaw(l(t('BBB Update test'), 'http://example.com/project/bbb_update_test'), 'Link to bbb_update_test project appears.');
-    $this->assertRaw(l(t('CCC Update test'), 'http://example.com/project/ccc_update_test'), 'Link to bbb_update_test project appears.');
+    $this->assertRaw(l(t('BBB Update test'), 'http://example.com/project/bbb_update_test'), t('Link to bbb_update_test project appears.'));
+    $this->assertRaw(l(t('CCC Update test'), 'http://example.com/project/ccc_update_test'), t('Link to bbb_update_test project appears.'));
 
     // We want to make sure we see the BBB project before the CCC project.
     // Instead of just searching for 'BBB Update test' or something, we want
@@ -195,7 +195,7 @@ function testUpdateBaseThemeSecurityUpdate() {
     );
     $this->refreshUpdateStatus($xml_mapping);
     $this->assertText(t('Security update required!'));
-    $this->assertRaw(l(t('Update test base theme'), 'http://example.com/project/update_test_basetheme'), 'Link to the Update test base theme project appears.');
+    $this->assertRaw(l(t('Update test base theme'), 'http://example.com/project/update_test_basetheme'), t('Link to the Update test base theme project appears.'));
   }
 
   /**
@@ -251,13 +251,13 @@ function testUpdateShowDisabledThemes() {
       $this->assertNoText(t('Themes'));
       if ($check_disabled) {
         $this->assertText(t('Disabled themes'));
-        $this->assertRaw($base_theme_project_link, 'Link to the Update test base theme project appears.');
-        $this->assertRaw($sub_theme_project_link, 'Link to the Update test subtheme project appears.');
+        $this->assertRaw($base_theme_project_link, t('Link to the Update test base theme project appears.'));
+        $this->assertRaw($sub_theme_project_link, t('Link to the Update test subtheme project appears.'));
       }
       else {
         $this->assertNoText(t('Disabled themes'));
-        $this->assertNoRaw($base_theme_project_link, 'Link to the Update test base theme project does not appear.');
-        $this->assertNoRaw($sub_theme_project_link, 'Link to the Update test subtheme project does not appear.');
+        $this->assertNoRaw($base_theme_project_link, t('Link to the Update test base theme project does not appear.'));
+        $this->assertNoRaw($sub_theme_project_link, t('Link to the Update test subtheme project does not appear.'));
       }
     }
   }
@@ -313,9 +313,9 @@ function testUpdateBrokenFetchURL() {
     $this->assertUniqueText(t('Failed to get available update data for one project.'));
 
     // The other two should be listed as projects.
-    $this->assertRaw(l(t('AAA Update test'), 'http://example.com/project/aaa_update_test'), 'Link to aaa_update_test project appears.');
-    $this->assertNoRaw(l(t('BBB Update test'), 'http://example.com/project/bbb_update_test'), 'Link to bbb_update_test project does not appear.');
-    $this->assertRaw(l(t('CCC Update test'), 'http://example.com/project/ccc_update_test'), 'Link to bbb_update_test project appears.');
+    $this->assertRaw(l(t('AAA Update test'), 'http://example.com/project/aaa_update_test'), t('Link to aaa_update_test project appears.'));
+    $this->assertNoRaw(l(t('BBB Update test'), 'http://example.com/project/bbb_update_test'), t('Link to bbb_update_test project does not appear.'));
+    $this->assertRaw(l(t('CCC Update test'), 'http://example.com/project/ccc_update_test'), t('Link to bbb_update_test project appears.'));
   }
 
   /**
@@ -358,7 +358,7 @@ function testHookUpdateStatusAlter() {
     $this->drupalGet('admin/reports/updates');
     $this->assertRaw('<h3>' . t('Modules') . '</h3>');
     $this->assertText(t('Security update required!'));
-    $this->assertRaw(l(t('AAA Update test'), 'http://example.com/project/aaa_update_test'), 'Link to aaa_update_test project appears.');
+    $this->assertRaw(l(t('AAA Update test'), 'http://example.com/project/aaa_update_test'), t('Link to aaa_update_test project appears.'));
 
     // Visit the reports page again without the altering and make sure the
     // status is back to normal.
@@ -366,7 +366,7 @@ function testHookUpdateStatusAlter() {
     $this->drupalGet('admin/reports/updates');
     $this->assertRaw('<h3>' . t('Modules') . '</h3>');
     $this->assertNoText(t('Security update required!'));
-    $this->assertRaw(l(t('AAA Update test'), 'http://example.com/project/aaa_update_test'), 'Link to aaa_update_test project appears.');
+    $this->assertRaw(l(t('AAA Update test'), 'http://example.com/project/aaa_update_test'), t('Link to aaa_update_test project appears.'));
 
     // Turn the altering back on and visit the Update manager UI.
     $update_test_config->set('update_status', $update_status)->save();
diff --git a/core/modules/update/lib/Drupal/update/Tests/UpdateCoreTest.php b/core/modules/update/lib/Drupal/update/Tests/UpdateCoreTest.php
index 32dc111..5dc09fd 100644
--- a/core/modules/update/lib/Drupal/update/Tests/UpdateCoreTest.php
+++ b/core/modules/update/lib/Drupal/update/Tests/UpdateCoreTest.php
@@ -55,9 +55,9 @@ function testNormalUpdateAvailable() {
     $this->assertNoText(t('Up to date'));
     $this->assertText(t('Update available'));
     $this->assertNoText(t('Security update required!'));
-    $this->assertRaw(l('7.1', 'http://example.com/drupal-7-1-release'), 'Link to release appears.');
-    $this->assertRaw(l(t('Download'), 'http://example.com/drupal-7-1.tar.gz'), 'Link to download appears.');
-    $this->assertRaw(l(t('Release notes'), 'http://example.com/drupal-7-1-release'), 'Link to release notes appears.');
+    $this->assertRaw(l('7.1', 'http://example.com/drupal-7-1-release'), t('Link to release appears.'));
+    $this->assertRaw(l(t('Download'), 'http://example.com/drupal-7-1.tar.gz'), t('Link to download appears.'));
+    $this->assertRaw(l(t('Release notes'), 'http://example.com/drupal-7-1-release'), t('Link to release notes appears.'));
   }
 
   /**
@@ -70,9 +70,9 @@ function testSecurityUpdateAvailable() {
     $this->assertNoText(t('Up to date'));
     $this->assertNoText(t('Update available'));
     $this->assertText(t('Security update required!'));
-    $this->assertRaw(l('7.2', 'http://example.com/drupal-7-2-release'), 'Link to release appears.');
-    $this->assertRaw(l(t('Download'), 'http://example.com/drupal-7-2.tar.gz'), 'Link to download appears.');
-    $this->assertRaw(l(t('Release notes'), 'http://example.com/drupal-7-2-release'), 'Link to release notes appears.');
+    $this->assertRaw(l('7.2', 'http://example.com/drupal-7-2-release'), t('Link to release appears.'));
+    $this->assertRaw(l(t('Download'), 'http://example.com/drupal-7-2.tar.gz'), t('Link to download appears.'));
+    $this->assertRaw(l(t('Release notes'), 'http://example.com/drupal-7-2-release'), t('Link to release notes appears.'));
   }
 
   /**
diff --git a/core/modules/update/lib/Drupal/update/Tests/UpdateTestBase.php b/core/modules/update/lib/Drupal/update/Tests/UpdateTestBase.php
index 99d01d1..24032f7 100644
--- a/core/modules/update/lib/Drupal/update/Tests/UpdateTestBase.php
+++ b/core/modules/update/lib/Drupal/update/Tests/UpdateTestBase.php
@@ -55,7 +55,7 @@ protected function refreshUpdateStatus($xml_map, $url = 'update-test') {
    */
   protected function standardTests() {
     $this->assertRaw('<h3>' . t('Drupal core') . '</h3>');
-    $this->assertRaw(l(t('Drupal'), 'http://example.com/project/drupal'), 'Link to the Drupal project appears.');
+    $this->assertRaw(l(t('Drupal'), 'http://example.com/project/drupal'), t('Link to the Drupal project appears.'));
     $this->assertNoText(t('No available releases found'));
   }
 }
diff --git a/core/modules/update/lib/Drupal/update/Tests/UpdateUploadTest.php b/core/modules/update/lib/Drupal/update/Tests/UpdateUploadTest.php
index 4917630..c7ce8e1 100644
--- a/core/modules/update/lib/Drupal/update/Tests/UpdateUploadTest.php
+++ b/core/modules/update/lib/Drupal/update/Tests/UpdateUploadTest.php
@@ -68,9 +68,9 @@ public function testUploadModule() {
   function testFileNameExtensionMerging() {
     $this->drupalGet('admin/modules/install');
     // Make sure the bogus extension supported by update_test.module is there.
-    $this->assertPattern('/file extensions are supported:.*update-test-extension/', "Found 'update-test-extension' extension.");
+    $this->assertPattern('/file extensions are supported:.*update-test-extension/', t("Found 'update-test-extension' extension"));
     // Make sure it didn't clobber the first option from core.
-    $this->assertPattern('/file extensions are supported:.*tar/', "Found 'tar' extension.");
+    $this->assertPattern('/file extensions are supported:.*tar/', t("Found 'tar' extension"));
   }
 
   /**
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserAdminTest.php b/core/modules/user/lib/Drupal/user/Tests/UserAdminTest.php
index ef3a1d5..7589094 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserAdminTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserAdminTest.php
@@ -39,14 +39,14 @@ function testUserAdmin() {
     $admin_user = $this->drupalCreateUser(array('administer users'));
     $this->drupalLogin($admin_user);
     $this->drupalGet('admin/people');
-    $this->assertText($user_a->name, 'Found user A on admin users page');
-    $this->assertText($user_b->name, 'Found user B on admin users page');
-    $this->assertText($user_c->name, 'Found user C on admin users page');
-    $this->assertText($admin_user->name, 'Found Admin user on admin users page');
+    $this->assertText($user_a->name, t('Found user A on admin users page'));
+    $this->assertText($user_b->name, t('Found user B on admin users page'));
+    $this->assertText($user_c->name, t('Found user C on admin users page'));
+    $this->assertText($admin_user->name, t('Found Admin user on admin users page'));
 
     // Test for existence of edit link in table.
     $link = l(t('edit'), "user/$user_a->uid/edit", array('query' => array('destination' => 'admin/people')));
-    $this->assertRaw($link, 'Found user A edit link on admin users page');
+    $this->assertRaw($link, t('Found user A edit link on admin users page'));
 
     // Filter the users by permission 'administer taxonomy'.
     $edit = array();
@@ -54,9 +54,9 @@ function testUserAdmin() {
     $this->drupalPost('admin/people', $edit, t('Filter'));
 
     // Check if the correct users show up.
-    $this->assertNoText($user_a->name, 'User A not on filtered by perm admin users page');
-    $this->assertText($user_b->name, 'Found user B on filtered by perm admin users page');
-    $this->assertText($user_c->name, 'Found user C on filtered by perm admin users page');
+    $this->assertNoText($user_a->name, t('User A not on filtered by perm admin users page'));
+    $this->assertText($user_b->name, t('Found user B on filtered by perm admin users page'));
+    $this->assertText($user_c->name, t('Found user C on filtered by perm admin users page'));
 
     // Filter the users by role. Grab the system-generated role name for User C.
     $roles = $user_c->roles;
@@ -65,9 +65,9 @@ function testUserAdmin() {
     $this->drupalPost('admin/people', $edit, t('Refine'));
 
     // Check if the correct users show up when filtered by role.
-    $this->assertNoText($user_a->name, 'User A not on filtered by role on admin users page');
-    $this->assertNoText($user_b->name, 'User B not on filtered by role on admin users page');
-    $this->assertText($user_c->name, 'User C on filtered by role on admin users page');
+    $this->assertNoText($user_a->name, t('User A not on filtered by role on admin users page'));
+    $this->assertNoText($user_b->name, t('User B not on filtered by role on admin users page'));
+    $this->assertText($user_c->name, t('User C on filtered by role on admin users page'));
 
     // Test blocking of a user.
     $account = user_load($user_c->uid);
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserAuthmapAssignmentTest.php b/core/modules/user/lib/Drupal/user/Tests/UserAuthmapAssignmentTest.php
index 92cc54c..332c563 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserAuthmapAssignmentTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserAuthmapAssignmentTest.php
@@ -15,9 +15,9 @@
 class UserAuthmapAssignmentTest extends WebTestBase {
   public static function getInfo() {
     return array(
-      'name' => 'Authmap assignment',
-      'description' => 'Tests that users can be assigned and unassigned authmaps.',
-      'group' => 'User'
+      'name' => t('Authmap assignment'),
+      'description' => t('Tests that users can be assigned and unassigned authmaps.'),
+      'group' => t('User')
     );
   }
 
@@ -44,7 +44,7 @@ function testAuthmapAssignment()  {
       ),
     );
     foreach ($expected_authmaps as $authname => $expected_output) {
-      $this->assertIdentical(user_get_authmaps($authname), $expected_output, format_string('Authmap for authname %authname was set correctly.', array('%authname' => $authname)));
+      $this->assertIdentical(user_get_authmaps($authname), $expected_output, t('Authmap for authname %authname was set correctly.', array('%authname' => $authname)));
     }
 
     // Remove authmap for module poll, add authmap for module blog.
@@ -57,13 +57,13 @@ function testAuthmapAssignment()  {
     // Assert that external username one does not have authmaps.
     $remove_username = 'external username one';
     unset($expected_authmaps[$remove_username]);
-    $this->assertFalse(user_get_authmaps($remove_username), format_string('Authmap for %authname was removed.', array('%authname' => $remove_username)));
+    $this->assertFalse(user_get_authmaps($remove_username), t('Authmap for %authname was removed.', array('%authname' => $remove_username)));
 
     // Assert that a new authmap was created for external username three, and
     // existing authmaps for external username two were unchanged.
     $expected_authmaps['external username three'] = array('blog' => 'external username three');
     foreach ($expected_authmaps as $authname => $expected_output) {
-      $this->assertIdentical(user_get_authmaps($authname), $expected_output, format_string('Authmap for authname %authname was set correctly.', array('%authname' => $authname)));
+      $this->assertIdentical(user_get_authmaps($authname), $expected_output, t('Authmap for authname %authname was set correctly.', array('%authname' => $authname)));
     }
   }
 }
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserAutocompleteTest.php b/core/modules/user/lib/Drupal/user/Tests/UserAutocompleteTest.php
index 8f058f3..d5f1d8a 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserAutocompleteTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserAutocompleteTest.php
@@ -36,15 +36,15 @@ function testUserAutocomplete() {
     // Check access from unprivileged user, should be denied.
     $this->drupalLogin($this->unprivileged_user);
     $this->drupalGet('user/autocomplete/' . $this->unprivileged_user->name[0]);
-    $this->assertResponse(403, 'Autocompletion access denied to user without permission.');
+    $this->assertResponse(403, t('Autocompletion access denied to user without permission.'));
 
     // Check access from privileged user.
     $this->drupalLogout();
     $this->drupalLogin($this->privileged_user);
     $this->drupalGet('user/autocomplete/' . $this->unprivileged_user->name[0]);
-    $this->assertResponse(200, 'Autocompletion access allowed.');
+    $this->assertResponse(200, t('Autocompletion access allowed.'));
 
     // Using first letter of the user's name, make sure the user's full name is in the results.
-    $this->assertRaw($this->unprivileged_user->name, 'User name found in autocompletion results.');
+    $this->assertRaw($this->unprivileged_user->name, t('User name found in autocompletion results.'));
   }
 }
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserBlocksTests.php b/core/modules/user/lib/Drupal/user/Tests/UserBlocksTests.php
index 07c71e8..79503cf 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserBlocksTests.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserBlocksTests.php
@@ -61,23 +61,23 @@ function testUserLoginBlock() {
     $edit['name'] = $user->name;
     $edit['pass'] = $user->pass_raw;
     $this->drupalPost('admin/people/permissions', $edit, t('Log in'));
-    $this->assertNoText(t('User login'), 'Logged in.');
+    $this->assertNoText(t('User login'), t('Logged in.'));
 
     // Check that we are still on the same page.
-    $this->assertEqual(url('admin/people/permissions', array('absolute' => TRUE)), $this->getUrl(), 'Still on the same page after login for access denied page');
+    $this->assertEqual(url('admin/people/permissions', array('absolute' => TRUE)), $this->getUrl(), t('Still on the same page after login for access denied page'));
 
     // Now, log out and repeat with a non-403 page.
     $this->drupalLogout();
     $this->drupalPost('filter/tips', $edit, t('Log in'));
-    $this->assertNoText(t('User login'), 'Logged in.');
-    $this->assertPattern('!<title.*?' . t('Compose tips') . '.*?</title>!', 'Still on the same page after login for allowed page');
+    $this->assertNoText(t('User login'), t('Logged in.'));
+    $this->assertPattern('!<title.*?' . t('Compose tips') . '.*?</title>!', t('Still on the same page after login for allowed page'));
 
     // Check that the user login block is not vulnerable to information
     // disclosure to third party sites.
     $this->drupalLogout();
     $this->drupalPost('http://example.com/', $edit, t('Log in'), array('external' => FALSE));
     // Check that we remain on the site after login.
-    $this->assertEqual(url('user/' . $user->uid, array('absolute' => TRUE)), $this->getUrl(), 'Redirected to user profile page after login from the frontpage');
+    $this->assertEqual(url('user/' . $user->uid, array('absolute' => TRUE)), $this->getUrl(), t('Redirected to user profile page after login from the frontpage'));
   }
 
   /**
@@ -88,12 +88,12 @@ function testWhosOnlineBlock() {
     $user1 = $this->drupalCreateUser(array());
     $user2 = $this->drupalCreateUser(array());
     $user3 = $this->drupalCreateUser(array());
-    $this->assertEqual(db_query("SELECT COUNT(*) FROM {sessions}")->fetchField(), 0, 'Sessions table is empty.');
+    $this->assertEqual(db_query("SELECT COUNT(*) FROM {sessions}")->fetchField(), 0, t('Sessions table is empty.'));
 
     // Insert a user with two sessions.
     $this->insertSession(array('uid' => $user1->uid));
     $this->insertSession(array('uid' => $user1->uid));
-    $this->assertEqual(db_query("SELECT COUNT(*) FROM {sessions} WHERE uid = :uid", array(':uid' => $user1->uid))->fetchField(), 2, 'Duplicate user session has been inserted.');
+    $this->assertEqual(db_query("SELECT COUNT(*) FROM {sessions} WHERE uid = :uid", array(':uid' => $user1->uid))->fetchField(), 2, t('Duplicate user session has been inserted.'));
 
     // Insert a user with only one session.
     $this->insertSession(array('uid' => $user2->uid, 'timestamp' => REQUEST_TIME + 1));
@@ -109,11 +109,11 @@ function testWhosOnlineBlock() {
     $block = user_block_view('online');
     $block['content'] = render($block['content']);
     $this->drupalSetContent($block['content']);
-    $this->assertRaw(t('2 users'), 'Correct number of online users (2 users).');
-    $this->assertText($user1->name, 'Active user 1 found in online list.');
-    $this->assertText($user2->name, 'Active user 2 found in online list.');
-    $this->assertNoText($user3->name, 'Inactive user not found in online list.');
-    $this->assertTrue(strpos($this->drupalGetContent(), $user1->name) > strpos($this->drupalGetContent(), $user2->name), 'Online users are ordered correctly.');
+    $this->assertRaw(t('2 users'), t('Correct number of online users (2 users).'));
+    $this->assertText($user1->name, t('Active user 1 found in online list.'));
+    $this->assertText($user2->name, t('Active user 2 found in online list.'));
+    $this->assertNoText($user3->name, t("Inactive user not found in online list."));
+    $this->assertTrue(strpos($this->drupalGetContent(), $user1->name) > strpos($this->drupalGetContent(), $user2->name), t('Online users are ordered correctly.'));
   }
 
   /**
@@ -129,6 +129,6 @@ private function insertSession(array $fields = array()) {
     db_insert('sessions')
       ->fields($fields)
       ->execute();
-    $this->assertEqual(db_query("SELECT COUNT(*) FROM {sessions} WHERE uid = :uid AND sid = :sid AND timestamp = :timestamp", array(':uid' => $fields['uid'], ':sid' => $fields['sid'], ':timestamp' => $fields['timestamp']))->fetchField(), 1, 'Session record inserted.');
+    $this->assertEqual(db_query("SELECT COUNT(*) FROM {sessions} WHERE uid = :uid AND sid = :sid AND timestamp = :timestamp", array(':uid' => $fields['uid'], ':sid' => $fields['sid'], ':timestamp' => $fields['timestamp']))->fetchField(), 1, t('Session record inserted.'));
   }
 }
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserCancelTest.php b/core/modules/user/lib/Drupal/user/Tests/UserCancelTest.php
index 8b51fe0..0d12cff 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserCancelTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserCancelTest.php
@@ -48,18 +48,18 @@ function testUserCancelWithoutPermission() {
 
     // Attempt to cancel account.
     $this->drupalGet('user/' . $account->uid . '/edit');
-    $this->assertNoRaw(t('Cancel account'), 'No cancel account button displayed.');
+    $this->assertNoRaw(t('Cancel account'), t('No cancel account button displayed.'));
 
     // Attempt bogus account cancellation request confirmation.
     $timestamp = $account->login;
     $this->drupalGet("user/$account->uid/cancel/confirm/$timestamp/" . user_pass_rehash($account->pass, $timestamp, $account->login));
-    $this->assertResponse(403, 'Bogus cancelling request rejected.');
+    $this->assertResponse(403, t('Bogus cancelling request rejected.'));
     $account = user_load($account->uid);
-    $this->assertTrue($account->status == 1, 'User account was not canceled.');
+    $this->assertTrue($account->status == 1, t('User account was not canceled.'));
 
     // Confirm user's content has not been altered.
     $test_node = node_load($node->nid, TRUE);
-    $this->assertTrue(($test_node->uid == $account->uid && $test_node->status == 1), 'Node of the user has not been altered.');
+    $this->assertTrue(($test_node->uid == $account->uid && $test_node->status == 1), t('Node of the user has not been altered.'));
   }
 
   /**
@@ -98,7 +98,7 @@ function testUserCancelUid1() {
 
     // Verify that uid 1's account was not cancelled.
     $user1 = user_load(1, TRUE);
-    $this->assertEqual($user1->status, 1, 'User #1 still exists and is not blocked.');
+    $this->assertEqual($user1->status, 1, t('User #1 still exists and is not blocked.'));
   }
 
   /**
@@ -122,25 +122,25 @@ function testUserCancelInvalid() {
     // Confirm account cancellation.
     $timestamp = time();
     $this->drupalPost(NULL, NULL, t('Cancel account'));
-    $this->assertText(t('A confirmation request to cancel your account has been sent to your e-mail address.'), 'Account cancellation request mailed message displayed.');
+    $this->assertText(t('A confirmation request to cancel your account has been sent to your e-mail address.'), t('Account cancellation request mailed message displayed.'));
 
     // Attempt bogus account cancellation request confirmation.
     $bogus_timestamp = $timestamp + 60;
     $this->drupalGet("user/$account->uid/cancel/confirm/$bogus_timestamp/" . user_pass_rehash($account->pass, $bogus_timestamp, $account->login));
-    $this->assertText(t('You have tried to use an account cancellation link that has expired. Please request a new one using the form below.'), 'Bogus cancelling request rejected.');
+    $this->assertText(t('You have tried to use an account cancellation link that has expired. Please request a new one using the form below.'), t('Bogus cancelling request rejected.'));
     $account = user_load($account->uid);
-    $this->assertTrue($account->status == 1, 'User account was not canceled.');
+    $this->assertTrue($account->status == 1, t('User account was not canceled.'));
 
     // Attempt expired account cancellation request confirmation.
     $bogus_timestamp = $timestamp - 86400 - 60;
     $this->drupalGet("user/$account->uid/cancel/confirm/$bogus_timestamp/" . user_pass_rehash($account->pass, $bogus_timestamp, $account->login));
-    $this->assertText(t('You have tried to use an account cancellation link that has expired. Please request a new one using the form below.'), 'Expired cancel account request rejected.');
+    $this->assertText(t('You have tried to use an account cancellation link that has expired. Please request a new one using the form below.'), t('Expired cancel account request rejected.'));
     $account = user_load($account->uid, TRUE);
-    $this->assertTrue($account->status, 'User account was not canceled.');
+    $this->assertTrue($account->status, t('User account was not canceled.'));
 
     // Confirm user's content has not been altered.
     $test_node = node_load($node->nid, TRUE);
-    $this->assertTrue(($test_node->uid == $account->uid && $test_node->status == 1), 'Node of the user has not been altered.');
+    $this->assertTrue(($test_node->uid == $account->uid && $test_node->status == 1), t('Node of the user has not been altered.'));
   }
 
   /**
@@ -159,23 +159,23 @@ function testUserBlock() {
     // Attempt to cancel account.
     $this->drupalGet('user/' . $account->uid . '/edit');
     $this->drupalPost(NULL, NULL, t('Cancel account'));
-    $this->assertText(t('Are you sure you want to cancel your account?'), 'Confirmation form to cancel account displayed.');
-    $this->assertText(t('Your account will be blocked and you will no longer be able to log in. All of your content will remain attributed to your user name.'), 'Informs that all content will be remain as is.');
-    $this->assertNoText(t('Select the method to cancel the account above.'), 'Does not allow user to select account cancellation method.');
+    $this->assertText(t('Are you sure you want to cancel your account?'), t('Confirmation form to cancel account displayed.'));
+    $this->assertText(t('Your account will be blocked and you will no longer be able to log in. All of your content will remain attributed to your user name.'), t('Informs that all content will be remain as is.'));
+    $this->assertNoText(t('Select the method to cancel the account above.'), t('Does not allow user to select account cancellation method.'));
 
     // Confirm account cancellation.
     $timestamp = time();
 
     $this->drupalPost(NULL, NULL, t('Cancel account'));
-    $this->assertText(t('A confirmation request to cancel your account has been sent to your e-mail address.'), 'Account cancellation request mailed message displayed.');
+    $this->assertText(t('A confirmation request to cancel your account has been sent to your e-mail address.'), t('Account cancellation request mailed message displayed.'));
 
     // Confirm account cancellation request.
     $this->drupalGet("user/$account->uid/cancel/confirm/$timestamp/" . user_pass_rehash($account->pass, $timestamp, $account->login));
     $account = user_load($account->uid, TRUE);
-    $this->assertTrue($account->status == 0, 'User has been blocked.');
+    $this->assertTrue($account->status == 0, t('User has been blocked.'));
 
     // Confirm user is logged out.
-    $this->assertNoText($account->name, 'Logged out.');
+    $this->assertNoText($account->name, t('Logged out.'));
   }
 
   /**
@@ -199,27 +199,27 @@ function testUserBlockUnpublish() {
     // Attempt to cancel account.
     $this->drupalGet('user/' . $account->uid . '/edit');
     $this->drupalPost(NULL, NULL, t('Cancel account'));
-    $this->assertText(t('Are you sure you want to cancel your account?'), 'Confirmation form to cancel account displayed.');
-    $this->assertText(t('Your account will be blocked and you will no longer be able to log in. All of your content will be hidden from everyone but administrators.'), 'Informs that all content will be unpublished.');
+    $this->assertText(t('Are you sure you want to cancel your account?'), t('Confirmation form to cancel account displayed.'));
+    $this->assertText(t('Your account will be blocked and you will no longer be able to log in. All of your content will be hidden from everyone but administrators.'), t('Informs that all content will be unpublished.'));
 
     // Confirm account cancellation.
     $timestamp = time();
     $this->drupalPost(NULL, NULL, t('Cancel account'));
-    $this->assertText(t('A confirmation request to cancel your account has been sent to your e-mail address.'), 'Account cancellation request mailed message displayed.');
+    $this->assertText(t('A confirmation request to cancel your account has been sent to your e-mail address.'), t('Account cancellation request mailed message displayed.'));
 
     // Confirm account cancellation request.
     $this->drupalGet("user/$account->uid/cancel/confirm/$timestamp/" . user_pass_rehash($account->pass, $timestamp, $account->login));
     $account = user_load($account->uid, TRUE);
-    $this->assertTrue($account->status == 0, 'User has been blocked.');
+    $this->assertTrue($account->status == 0, t('User has been blocked.'));
 
     // Confirm user's content has been unpublished.
     $test_node = node_load($node->nid, TRUE);
-    $this->assertTrue($test_node->status == 0, 'Node of the user has been unpublished.');
+    $this->assertTrue($test_node->status == 0, t('Node of the user has been unpublished.'));
     $test_node = node_revision_load($node->vid);
-    $this->assertTrue($test_node->status == 0, 'Node revision of the user has been unpublished.');
+    $this->assertTrue($test_node->status == 0, t('Node revision of the user has been unpublished.'));
 
     // Confirm user is logged out.
-    $this->assertNoText($account->name, 'Logged out.');
+    $this->assertNoText($account->name, t('Logged out.'));
   }
 
   /**
@@ -249,28 +249,28 @@ function testUserAnonymize() {
     // Attempt to cancel account.
     $this->drupalGet('user/' . $account->uid . '/edit');
     $this->drupalPost(NULL, NULL, t('Cancel account'));
-    $this->assertText(t('Are you sure you want to cancel your account?'), 'Confirmation form to cancel account displayed.');
-    $this->assertRaw(t('Your account will be removed and all account information deleted. All of your content will be assigned to the %anonymous-name user.', array('%anonymous-name' => config('user.settings')->get('anonymous'))), 'Informs that all content will be attributed to anonymous account.');
+    $this->assertText(t('Are you sure you want to cancel your account?'), t('Confirmation form to cancel account displayed.'));
+    $this->assertRaw(t('Your account will be removed and all account information deleted. All of your content will be assigned to the %anonymous-name user.', array('%anonymous-name' => config('user.settings')->get('anonymous'))), t('Informs that all content will be attributed to anonymous account.'));
 
     // Confirm account cancellation.
     $timestamp = time();
     $this->drupalPost(NULL, NULL, t('Cancel account'));
-    $this->assertText(t('A confirmation request to cancel your account has been sent to your e-mail address.'), 'Account cancellation request mailed message displayed.');
+    $this->assertText(t('A confirmation request to cancel your account has been sent to your e-mail address.'), t('Account cancellation request mailed message displayed.'));
 
     // Confirm account cancellation request.
     $this->drupalGet("user/$account->uid/cancel/confirm/$timestamp/" . user_pass_rehash($account->pass, $timestamp, $account->login));
-    $this->assertFalse(user_load($account->uid, TRUE), 'User is not found in the database.');
+    $this->assertFalse(user_load($account->uid, TRUE), t('User is not found in the database.'));
 
     // Confirm that user's content has been attributed to anonymous user.
     $test_node = node_load($node->nid, TRUE);
-    $this->assertTrue(($test_node->uid == 0 && $test_node->status == 1), 'Node of the user has been attributed to anonymous user.');
+    $this->assertTrue(($test_node->uid == 0 && $test_node->status == 1), t('Node of the user has been attributed to anonymous user.'));
     $test_node = node_revision_load($revision, TRUE);
-    $this->assertTrue(($test_node->revision_uid == 0 && $test_node->status == 1), 'Node revision of the user has been attributed to anonymous user.');
+    $this->assertTrue(($test_node->revision_uid == 0 && $test_node->status == 1), t('Node revision of the user has been attributed to anonymous user.'));
     $test_node = node_load($revision_node->nid, TRUE);
-    $this->assertTrue(($test_node->uid != 0 && $test_node->status == 1), "Current revision of the user's node was not attributed to anonymous user.");
+    $this->assertTrue(($test_node->uid != 0 && $test_node->status == 1), t("Current revision of the user's node was not attributed to anonymous user."));
 
     // Confirm that user is logged out.
-    $this->assertNoText($account->name, 'Logged out.');
+    $this->assertNoText($account->name, t('Logged out.'));
   }
 
   /**
@@ -299,7 +299,7 @@ function testUserDelete() {
     $this->assertText(t('Your comment has been posted.'));
     $comments = entity_load_multiple_by_properties('comment', array('subject' => $edit['subject']));
     $comment = reset($comments);
-    $this->assertTrue($comment->cid, 'Comment found.');
+    $this->assertTrue($comment->cid, t('Comment found.'));
 
     // Create a node with two revisions, the initial one belonging to the
     // cancelling user.
@@ -313,26 +313,26 @@ function testUserDelete() {
     // Attempt to cancel account.
     $this->drupalGet('user/' . $account->uid . '/edit');
     $this->drupalPost(NULL, NULL, t('Cancel account'));
-    $this->assertText(t('Are you sure you want to cancel your account?'), 'Confirmation form to cancel account displayed.');
-    $this->assertText(t('Your account will be removed and all account information deleted. All of your content will also be deleted.'), 'Informs that all content will be deleted.');
+    $this->assertText(t('Are you sure you want to cancel your account?'), t('Confirmation form to cancel account displayed.'));
+    $this->assertText(t('Your account will be removed and all account information deleted. All of your content will also be deleted.'), t('Informs that all content will be deleted.'));
 
     // Confirm account cancellation.
     $timestamp = time();
     $this->drupalPost(NULL, NULL, t('Cancel account'));
-    $this->assertText(t('A confirmation request to cancel your account has been sent to your e-mail address.'), 'Account cancellation request mailed message displayed.');
+    $this->assertText(t('A confirmation request to cancel your account has been sent to your e-mail address.'), t('Account cancellation request mailed message displayed.'));
 
     // Confirm account cancellation request.
     $this->drupalGet("user/$account->uid/cancel/confirm/$timestamp/" . user_pass_rehash($account->pass, $timestamp, $account->login));
-    $this->assertFalse(user_load($account->uid, TRUE), 'User is not found in the database.');
+    $this->assertFalse(user_load($account->uid, TRUE), t('User is not found in the database.'));
 
     // Confirm that user's content has been deleted.
-    $this->assertFalse(node_load($node->nid, TRUE), 'Node of the user has been deleted.');
-    $this->assertFalse(node_revision_load($revision), 'Node revision of the user has been deleted.');
-    $this->assertTrue(node_load($revision_node->nid, TRUE), "Current revision of the user's node was not deleted.");
-    $this->assertFalse(comment_load($comment->cid), 'Comment of the user has been deleted.');
+    $this->assertFalse(node_load($node->nid, TRUE), t('Node of the user has been deleted.'));
+    $this->assertFalse(node_revision_load($revision), t('Node revision of the user has been deleted.'));
+    $this->assertTrue(node_load($revision_node->nid, TRUE), t("Current revision of the user's node was not deleted."));
+    $this->assertFalse(comment_load($comment->cid), t('Comment of the user has been deleted.'));
 
     // Confirm that user is logged out.
-    $this->assertNoText($account->name, 'Logged out.');
+    $this->assertNoText($account->name, t('Logged out.'));
   }
 
   /**
@@ -351,13 +351,13 @@ function testUserCancelByAdmin() {
     // Delete regular user.
     $this->drupalGet('user/' . $account->uid . '/edit');
     $this->drupalPost(NULL, NULL, t('Cancel account'));
-    $this->assertRaw(t('Are you sure you want to cancel the account %name?', array('%name' => $account->name)), 'Confirmation form to cancel account displayed.');
-    $this->assertText(t('Select the method to cancel the account above.'), 'Allows to select account cancellation method.');
+    $this->assertRaw(t('Are you sure you want to cancel the account %name?', array('%name' => $account->name)), t('Confirmation form to cancel account displayed.'));
+    $this->assertText(t('Select the method to cancel the account above.'), t('Allows to select account cancellation method.'));
 
     // Confirm deletion.
     $this->drupalPost(NULL, NULL, t('Cancel account'));
-    $this->assertRaw(t('%name has been deleted.', array('%name' => $account->name)), 'User deleted.');
-    $this->assertFalse(user_load($account->uid), 'User is not found in the database.');
+    $this->assertRaw(t('%name has been deleted.', array('%name' => $account->name)), t('User deleted.'));
+    $this->assertFalse(user_load($account->uid), t('User is not found in the database.'));
   }
 
   /**
@@ -379,13 +379,13 @@ function testUserWithoutEmailCancelByAdmin() {
     // Delete regular user without e-mail address.
     $this->drupalGet('user/' . $account->uid . '/edit');
     $this->drupalPost(NULL, NULL, t('Cancel account'));
-    $this->assertRaw(t('Are you sure you want to cancel the account %name?', array('%name' => $account->name)), 'Confirmation form to cancel account displayed.');
-    $this->assertText(t('Select the method to cancel the account above.'), 'Allows to select account cancellation method.');
+    $this->assertRaw(t('Are you sure you want to cancel the account %name?', array('%name' => $account->name)), t('Confirmation form to cancel account displayed.'));
+    $this->assertText(t('Select the method to cancel the account above.'), t('Allows to select account cancellation method.'));
 
     // Confirm deletion.
     $this->drupalPost(NULL, NULL, t('Cancel account'));
-    $this->assertRaw(t('%name has been deleted.', array('%name' => $account->name)), 'User deleted.');
-    $this->assertFalse(user_load($account->uid), 'User is not found in the database.');
+    $this->assertRaw(t('%name has been deleted.', array('%name' => $account->name)), t('User deleted.'));
+    $this->assertFalse(user_load($account->uid), t('User is not found in the database.'));
   }
 
   /**
@@ -417,10 +417,10 @@ function testMassUserCancelByAdmin() {
     // Also try to cancel uid 1.
     $edit['accounts[1]'] = TRUE;
     $this->drupalPost('admin/people', $edit, t('Update'));
-    $this->assertText(t('Are you sure you want to cancel these user accounts?'), 'Confirmation form to cancel accounts displayed.');
-    $this->assertText(t('When cancelling these accounts'), 'Allows to select account cancellation method.');
-    $this->assertText(t('Require e-mail confirmation to cancel account.'), 'Allows to send confirmation mail.');
-    $this->assertText(t('Notify user when account is canceled.'), 'Allows to send notification mail.');
+    $this->assertText(t('Are you sure you want to cancel these user accounts?'), t('Confirmation form to cancel accounts displayed.'));
+    $this->assertText(t('When cancelling these accounts'), t('Allows to select account cancellation method.'));
+    $this->assertText(t('Require e-mail confirmation to cancel account.'), t('Allows to send confirmation mail.'));
+    $this->assertText(t('Notify user when account is canceled.'), t('Allows to send notification mail.'));
 
     // Confirm deletion.
     $this->drupalPost(NULL, NULL, t('Cancel accounts'));
@@ -429,15 +429,15 @@ function testMassUserCancelByAdmin() {
       $status = $status && (strpos($this->content, t('%name has been deleted.', array('%name' => $account->name))) !== FALSE);
       $status = $status && !user_load($account->uid, TRUE);
     }
-    $this->assertTrue($status, 'Users deleted and not found in the database.');
+    $this->assertTrue($status, t('Users deleted and not found in the database.'));
 
     // Ensure that admin account was not cancelled.
-    $this->assertText(t('A confirmation request to cancel your account has been sent to your e-mail address.'), 'Account cancellation request mailed message displayed.');
+    $this->assertText(t('A confirmation request to cancel your account has been sent to your e-mail address.'), t('Account cancellation request mailed message displayed.'));
     $admin_user = user_load($admin_user->uid);
-    $this->assertTrue($admin_user->status == 1, 'Administrative user is found in the database and enabled.');
+    $this->assertTrue($admin_user->status == 1, t('Administrative user is found in the database and enabled.'));
 
     // Verify that uid 1's account was not cancelled.
     $user1 = user_load(1, TRUE);
-    $this->assertEqual($user1->status, 1, 'User #1 still exists and is not blocked.');
+    $this->assertEqual($user1->status, 1, t('User #1 still exists and is not blocked.'));
   }
 }
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserEditTest.php b/core/modules/user/lib/Drupal/user/Tests/UserEditTest.php
index ea78e03..6bf60bc 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserEditTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserEditTest.php
@@ -47,12 +47,12 @@ function testUserEdit() {
     $edit['pass[pass1]'] = '';
     $edit['pass[pass2]'] = $this->randomName();
     $this->drupalPost("user/$user1->uid/edit", $edit, t('Save'));
-    $this->assertText(t("The specified passwords do not match."), 'Typing mismatched passwords displays an error message.');
+    $this->assertText(t("The specified passwords do not match."), t('Typing mismatched passwords displays an error message.'));
 
     $edit['pass[pass1]'] = $this->randomName();
     $edit['pass[pass2]'] = '';
     $this->drupalPost("user/$user1->uid/edit", $edit, t('Save'));
-    $this->assertText(t("The specified passwords do not match."), 'Typing mismatched passwords displays an error message.');
+    $this->assertText(t("The specified passwords do not match."), t('Typing mismatched passwords displays an error message.'));
 
     // Test that the error message appears when attempting to change the mail or
     // pass without the current password.
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserEntityCallbacksTest.php b/core/modules/user/lib/Drupal/user/Tests/UserEntityCallbacksTest.php
index a4bfd52..13eb006 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserEntityCallbacksTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserEntityCallbacksTest.php
@@ -40,12 +40,12 @@ function setUp() {
    * Test label callback.
    */
   function testLabelCallback() {
-    $this->assertEqual($this->account->label(), $this->account->name, 'The username should be used as label');
+    $this->assertEqual($this->account->label(), $this->account->name, t('The username should be used as label'));
 
     // Setup a random anonymous name to be sure the name is used.
     $name = $this->randomName();
     config('user.settings')->set('anonymous', $name)->save();
-    $this->assertEqual($this->anonymous->label(), $name, 'The variable anonymous should be used for name of uid 0');
+    $this->assertEqual($this->anonymous->label(), $name, t('The variable anonymous should be used for name of uid 0'));
   }
 
   /**
@@ -53,6 +53,6 @@ function testLabelCallback() {
    */
   function testUriCallback() {
     $uri = $this->account->uri();
-    $this->assertEqual('user/' . $this->account->uid, $uri['path'], 'Correct user URI.');
+    $this->assertEqual('user/' . $this->account->uid, $uri['path'], t('Correct user URI.'));
   }
 }
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserLanguageCreationTest.php b/core/modules/user/lib/Drupal/user/Tests/UserLanguageCreationTest.php
index 18a815c..d611b57 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserLanguageCreationTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserLanguageCreationTest.php
@@ -48,20 +48,20 @@ function testLocalUserCreation() {
       'predefined_langcode' => 'fr',
     );
     $this->drupalPost('admin/config/regional/language/add', $edit, t('Add language'));
-    $this->assertText('French', 'Language added successfully.');
-    $this->assertEqual($this->getUrl(), url('admin/config/regional/language', array('absolute' => TRUE)), 'Correct page redirection.');
+    $this->assertText('French', t('Language added successfully.'));
+    $this->assertEqual($this->getUrl(), url('admin/config/regional/language', array('absolute' => TRUE)), t('Correct page redirection.'));
 
     // Set language negotiation.
     $edit = array(
       'language_interface[enabled][language-url]' => TRUE,
     );
     $this->drupalPost('admin/config/regional/language/detection', $edit, t('Save settings'));
-    $this->assertText(t('Language negotiation configuration saved.'), 'Set language negotiation.');
+    $this->assertText(t('Language negotiation configuration saved.'), t('Set language negotiation.'));
 
     // Check if the language selector is available on admin/people/create and
     // set to the currently active language.
     $this->drupalGet($langcode . '/admin/people/create');
-    $this->assertOptionSelected("edit-preferred-langcode", $langcode, 'Global language set in the language selector.');
+    $this->assertOptionSelected("edit-preferred-langcode", $langcode, t('Global language set in the language selector.'));
 
     // Create a user with the admin/people/create form and check if the correct
     // language is set.
@@ -76,14 +76,14 @@ function testLocalUserCreation() {
     $this->drupalPost($langcode . '/admin/people/create', $edit, t('Create new account'));
 
     $user = user_load_by_name($username);
-    $this->assertEqual($user->preferred_langcode, $langcode, 'New user has correct preferred language set.');
-    $this->assertEqual($user->langcode, $langcode, 'New user has correct profile language set.');
+    $this->assertEqual($user->preferred_langcode, $langcode, t('New user has correct preferred language set.'));
+    $this->assertEqual($user->langcode, $langcode, t('New user has correct profile language set.'));
 
     // Register a new user and check if the language selector is hidden.
     $this->drupalLogout();
 
     $this->drupalGet($langcode . '/user/register');
-    $this->assertNoFieldByName('language[fr]', 'Language selector is not accessible.');
+    $this->assertNoFieldByName('language[fr]', t('Language selector is not accessible.'));
 
     $username = $this->randomName(10);
     $edit = array(
@@ -94,8 +94,8 @@ function testLocalUserCreation() {
     $this->drupalPost($langcode . '/user/register', $edit, t('Create new account'));
 
     $user = user_load_by_name($username);
-    $this->assertEqual($user->preferred_langcode, $langcode, 'New user has correct preferred language set.');
-    $this->assertEqual($user->langcode, $langcode, 'New user has correct profile language set.');
+    $this->assertEqual($user->preferred_langcode, $langcode, t('New user has correct preferred language set.'));
+    $this->assertEqual($user->langcode, $langcode, t('New user has correct profile language set.'));
 
     // Test if the admin can use the language selector and if the
     // correct language is was saved.
@@ -103,7 +103,7 @@ function testLocalUserCreation() {
 
     $this->drupalLogin($admin_user);
     $this->drupalGet($user_edit);
-    $this->assertOptionSelected("edit-preferred-langcode", $langcode, 'Language selector is accessible and correct language is selected.');
+    $this->assertOptionSelected("edit-preferred-langcode", $langcode, t('Language selector is accessible and correct language is selected.'));
 
     // Set pass_raw so we can login the new user.
     $user->pass_raw = $this->randomName(10);
@@ -116,6 +116,6 @@ function testLocalUserCreation() {
 
     $this->drupalLogin($user);
     $this->drupalGet($user_edit);
-    $this->assertOptionSelected("edit-preferred-langcode", $langcode, 'Language selector is accessible and correct language is selected.');
+    $this->assertOptionSelected("edit-preferred-langcode", $langcode, t('Language selector is accessible and correct language is selected.'));
   }
 }
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserLanguageTest.php b/core/modules/user/lib/Drupal/user/Tests/UserLanguageTest.php
index 7a3c7b5..f0155b6 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserLanguageTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserLanguageTest.php
@@ -60,18 +60,18 @@ function testUserLanguageConfiguration() {
     $path = 'user/' . $web_user->uid . '/edit';
     $this->drupalGet($path);
     // Ensure language settings fieldset is available.
-    $this->assertText(t('Language'), 'Language selector available.');
+    $this->assertText(t('Language'), t('Language selector available.'));
     // Ensure custom language is present.
-    $this->assertText($name, 'Language present on form.');
+    $this->assertText($name, t('Language present on form.'));
     // Switch to our custom language.
     $edit = array(
       'preferred_langcode' => $langcode,
     );
     $this->drupalPost($path, $edit, t('Save'));
     // Ensure form was submitted successfully.
-    $this->assertText(t('The changes have been saved.'), 'Changes were saved.');
+    $this->assertText(t('The changes have been saved.'), t('Changes were saved.'));
     // Check if language was changed.
-    $this->assertOptionSelected('edit-preferred-langcode', $langcode, 'Default language successfully updated.');
+    $this->assertOptionSelected('edit-preferred-langcode', $langcode, t('Default language successfully updated.'));
 
     $this->drupalLogout();
   }
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserLoginTest.php b/core/modules/user/lib/Drupal/user/Tests/UserLoginTest.php
index 0b6eeba..43cb43c 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserLoginTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserLoginTest.php
@@ -138,7 +138,7 @@ function assertFailedLogin($account, $flood_trigger = NULL) {
       'pass' => $account->pass_raw,
     );
     $this->drupalPost('user', $edit, t('Log in'));
-    $this->assertNoFieldByXPath("//input[@name='pass' and @value!='']", NULL, 'Password value attribute is blank.');
+    $this->assertNoFieldByXPath("//input[@name='pass' and @value!='']", NULL, t('Password value attribute is blank.'));
     if (isset($flood_trigger)) {
       if ($flood_trigger == 'user') {
         $this->assertRaw(format_plural(config('user.flood')->get('user_limit'), 'Sorry, there has been more than one failed login attempt for this account. It is temporarily blocked. Try again later or <a href="@url">request a new password</a>.', 'Sorry, there have been more than @count failed login attempts for this account. It is temporarily blocked. Try again later or <a href="@url">request a new password</a>.', array('@url' => url('user/password'))));
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserPermissionsTest.php b/core/modules/user/lib/Drupal/user/Tests/UserPermissionsTest.php
index 2455b10..43f43e3 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserPermissionsTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserPermissionsTest.php
@@ -41,24 +41,24 @@ function testUserPermissionChanges() {
     $account = $this->admin_user;
 
     // Add a permission.
-    $this->assertFalse(user_access('administer nodes', $account), 'User does not have "administer nodes" permission.');
+    $this->assertFalse(user_access('administer nodes', $account), t('User does not have "administer nodes" permission.'));
     $edit = array();
     $edit[$rid . '[administer nodes]'] = TRUE;
     $this->drupalPost('admin/people/permissions', $edit, t('Save permissions'));
-    $this->assertText(t('The changes have been saved.'), 'Successful save message displayed.');
+    $this->assertText(t('The changes have been saved.'), t('Successful save message displayed.'));
     drupal_static_reset('user_access');
     drupal_static_reset('user_role_permissions');
-    $this->assertTrue(user_access('administer nodes', $account), 'User now has "administer nodes" permission.');
+    $this->assertTrue(user_access('administer nodes', $account), t('User now has "administer nodes" permission.'));
 
     // Remove a permission.
-    $this->assertTrue(user_access('access user profiles', $account), 'User has "access user profiles" permission.');
+    $this->assertTrue(user_access('access user profiles', $account), t('User has "access user profiles" permission.'));
     $edit = array();
     $edit[$rid . '[access user profiles]'] = FALSE;
     $this->drupalPost('admin/people/permissions', $edit, t('Save permissions'));
-    $this->assertText(t('The changes have been saved.'), 'Successful save message displayed.');
+    $this->assertText(t('The changes have been saved.'), t('Successful save message displayed.'));
     drupal_static_reset('user_access');
     drupal_static_reset('user_role_permissions');
-    $this->assertFalse(user_access('access user profiles', $account), 'User no longer has "access user profiles" permission.');
+    $this->assertFalse(user_access('access user profiles', $account), t('User no longer has "access user profiles" permission.'));
   }
 
   /**
@@ -80,7 +80,7 @@ function testAdministratorRole() {
     // Aggregator depends on file module, enable that as well.
     $edit['modules[Core][file][enable]'] = TRUE;
     $this->drupalPost('admin/modules', $edit, t('Save configuration'));
-    $this->assertTrue(user_access('administer news feeds', $this->admin_user), 'The permission was automatically assigned to the administrator role');
+    $this->assertTrue(user_access('administer news feeds', $this->admin_user), t('The permission was automatically assigned to the administrator role'));
   }
 
   /**
@@ -91,9 +91,9 @@ function testUserRoleChangePermissions() {
     $account = $this->admin_user;
 
     // Verify current permissions.
-    $this->assertFalse(user_access('administer nodes', $account), 'User does not have "administer nodes" permission.');
-    $this->assertTrue(user_access('access user profiles', $account), 'User has "access user profiles" permission.');
-    $this->assertTrue(user_access('administer site configuration', $account), 'User has "administer site configuration" permission.');
+    $this->assertFalse(user_access('administer nodes', $account), t('User does not have "administer nodes" permission.'));
+    $this->assertTrue(user_access('access user profiles', $account), t('User has "access user profiles" permission.'));
+    $this->assertTrue(user_access('administer site configuration', $account), t('User has "administer site configuration" permission.'));
 
     // Change permissions.
     $permissions = array(
@@ -103,8 +103,8 @@ function testUserRoleChangePermissions() {
     user_role_change_permissions($rid, $permissions);
 
     // Verify proper permission changes.
-    $this->assertTrue(user_access('administer nodes', $account), 'User now has "administer nodes" permission.');
-    $this->assertFalse(user_access('access user profiles', $account), 'User no longer has "access user profiles" permission.');
-    $this->assertTrue(user_access('administer site configuration', $account), 'User still has "administer site configuration" permission.');
+    $this->assertTrue(user_access('administer nodes', $account), t('User now has "administer nodes" permission.'));
+    $this->assertFalse(user_access('access user profiles', $account), t('User no longer has "access user profiles" permission.'));
+    $this->assertTrue(user_access('administer site configuration', $account), t('User still has "administer site configuration" permission.'));
   }
 }
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserPictureTest.php b/core/modules/user/lib/Drupal/user/Tests/UserPictureTest.php
index 0413b3b..ddfae72 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserPictureTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserPictureTest.php
@@ -61,7 +61,7 @@ function testNoPicture() {
     // Try to upload a file that is not an image for the user picture.
     $not_an_image = current($this->drupalGetTestFiles('html'));
     $this->saveUserPicture($not_an_image);
-    $this->assertRaw(t('Only JPEG, PNG and GIF images are allowed.'), 'Non-image files are not accepted.');
+    $this->assertRaw(t('Only JPEG, PNG and GIF images are allowed.'), t('Non-image files are not accepted.'));
   }
 
   /**
@@ -87,13 +87,13 @@ function testWithGDinvalidDimension() {
       // Check that the image was resized and is being displayed on the
       // user's profile page.
       $text = t('The image was resized to fit within the maximum allowed dimensions of %dimensions pixels.', array('%dimensions' => $test_dim));
-      $this->assertRaw($text, 'Image was resized.');
+      $this->assertRaw($text, t('Image was resized.'));
       $alt = t("@user's picture", array('@user' => user_format_name($this->user)));
       $style = variable_get('user_picture_style', '');
-      $this->assertRaw(image_style_url($style, $pic_path), "Image is displayed in user's edit page");
+      $this->assertRaw(image_style_url($style, $pic_path), t("Image is displayed in user's edit page"));
 
       // Check if file is located in proper directory.
-      $this->assertTrue(is_file($pic_path), 'File is located in proper directory.');
+      $this->assertTrue(is_file($pic_path), t("File is located in proper directory"));
     }
   }
 
@@ -124,12 +124,12 @@ function testWithGDinvalidSize() {
 
       // Test that the upload failed and that the correct reason was cited.
       $text = t('The specified file %filename could not be uploaded.', array('%filename' => $image->filename));
-      $this->assertRaw($text, 'Upload failed.');
+      $this->assertRaw($text, t('Upload failed.'));
       $text = t('The file is %filesize exceeding the maximum file size of %maxsize.', array('%filesize' => format_size(filesize($image->uri)), '%maxsize' => format_size($test_size * 1024)));
-      $this->assertRaw($text, 'File size cited as reason for failure.');
+      $this->assertRaw($text, t('File size cited as reason for failure.'));
 
       // Check if file is not uploaded.
-      $this->assertFalse(is_file($pic_path), 'File was not uploaded.');
+      $this->assertFalse(is_file($pic_path), t('File was not uploaded.'));
     }
   }
 
@@ -156,12 +156,12 @@ function testWithoutGDinvalidDimension() {
 
       // Test that the upload failed and that the correct reason was cited.
       $text = t('The specified file %filename could not be uploaded.', array('%filename' => $image->filename));
-      $this->assertRaw($text, 'Upload failed.');
+      $this->assertRaw($text, t('Upload failed.'));
       $text = t('The image is too large; the maximum dimensions are %dimensions pixels.', array('%dimensions' => $test_dim));
-      $this->assertRaw($text, 'Checking response on invalid image (dimensions).');
+      $this->assertRaw($text, t('Checking response on invalid image (dimensions).'));
 
       // Check if file is not uploaded.
-      $this->assertFalse(is_file($pic_path), 'File was not uploaded.');
+      $this->assertFalse(is_file($pic_path), t('File was not uploaded.'));
     }
   }
 
@@ -189,12 +189,12 @@ function testWithoutGDinvalidSize() {
 
       // Test that the upload failed and that the correct reason was cited.
       $text = t('The specified file %filename could not be uploaded.', array('%filename' => $image->filename));
-      $this->assertRaw($text, 'Upload failed.');
+      $this->assertRaw($text, t('Upload failed.'));
       $text = t('The file is %filesize exceeding the maximum file size of %maxsize.', array('%filesize' => format_size(filesize($image->uri)), '%maxsize' => format_size($test_size * 1024)));
-      $this->assertRaw($text, 'File size cited as reason for failure.');
+      $this->assertRaw($text, t('File size cited as reason for failure.'));
 
       // Check if file is not uploaded.
-      $this->assertFalse(is_file($pic_path), 'File was not uploaded.');
+      $this->assertFalse(is_file($pic_path), t('File was not uploaded.'));
     }
   }
 
@@ -220,17 +220,17 @@ function testPictureIsValid() {
 
       // Check if image is displayed in user's profile page.
       $this->drupalGet('user');
-      $this->assertRaw(file_uri_target($pic_path), "Image is displayed in user's profile page.");
+      $this->assertRaw(file_uri_target($pic_path), t("Image is displayed in user's profile page"));
 
       // Check if file is located in proper directory.
-      $this->assertTrue(is_file($pic_path), 'File is located in proper directory.');
+      $this->assertTrue(is_file($pic_path), t('File is located in proper directory'));
 
       // Set new picture dimensions.
       $test_dim = ($info['width'] + 5) . 'x' . ($info['height'] + 5);
       variable_set('user_picture_dimensions', $test_dim);
 
       $pic_path2 = $this->saveUserPicture($image);
-      $this->assertNotEqual($pic_path, $pic_path2, 'Filename of second picture is different.');
+      $this->assertNotEqual($pic_path, $pic_path2, t('Filename of second picture is different.'));
     }
   }
 
@@ -250,8 +250,8 @@ function testExternalPicture() {
 
     // Get the user picture image via xpath.
     $elements = $this->xpath('//div[@class="user-picture"]/img');
-    $this->assertEqual(count($elements), 1, "There is exactly one user picture on the user's profile page.");
-    $this->assertEqual($pic_path, (string) $elements[0]['src'], format_string("User picture source is correct: %path %elements.", array('%path' => $pic_path, '%elements' => print_r($elements, TRUE))));
+    $this->assertEqual(count($elements), 1, t("There is exactly one user picture on the user's profile page"));
+    $this->assertEqual($pic_path, (string) $elements[0]['src'], t("User picture source is correct: " . $pic_path . " " . print_r($elements, TRUE)));
   }
 
   /**
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserRegistrationTest.php b/core/modules/user/lib/Drupal/user/Tests/UserRegistrationTest.php
index 9c518d7..d89192f 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserRegistrationTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserRegistrationTest.php
@@ -34,7 +34,7 @@ function testRegistrationWithEmailVerification() {
     // Set registration to administrator only.
     $config->set('register', USER_REGISTER_ADMINISTRATORS_ONLY)->save();
     $this->drupalGet('user/register');
-    $this->assertResponse(403, 'Registration page is inaccessible when only administrators can create accounts.');
+    $this->assertResponse(403, t('Registration page is inaccessible when only administrators can create accounts.'));
 
     // Allow registration by site visitors without administrator approval.
     $config->set('register', USER_REGISTER_VISITORS)->save();
@@ -42,10 +42,10 @@ function testRegistrationWithEmailVerification() {
     $edit['name'] = $name = $this->randomName();
     $edit['mail'] = $mail = $edit['name'] . '@example.com';
     $this->drupalPost('user/register', $edit, t('Create new account'));
-    $this->assertText(t('A welcome message with further instructions has been sent to your e-mail address.'), 'User registered successfully.');
+    $this->assertText(t('A welcome message with further instructions has been sent to your e-mail address.'), t('User registered successfully.'));
     $accounts = entity_load_multiple_by_properties('user', array('name' => $name, 'mail' => $mail));
     $new_user = reset($accounts);
-    $this->assertTrue($new_user->status, 'New account is active after registration.');
+    $this->assertTrue($new_user->status, t('New account is active after registration.'));
 
     // Allow registration by site visitors, but require administrator approval.
     $config->set('register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL)->save();
@@ -56,7 +56,7 @@ function testRegistrationWithEmailVerification() {
     entity_get_controller('user')->resetCache();
     $accounts = entity_load_multiple_by_properties('user', array('name' => $name, 'mail' => $mail));
     $new_user = reset($accounts);
-    $this->assertFalse($new_user->status, 'New account is blocked until approved by an administrator.');
+    $this->assertFalse($new_user->status, t('New account is blocked until approved by an administrator.'));
   }
 
   function testRegistrationWithoutEmailVerification() {
@@ -76,7 +76,7 @@ function testRegistrationWithoutEmailVerification() {
     $edit['pass[pass1]'] = '99999.0';
     $edit['pass[pass2]'] = '99999';
     $this->drupalPost('user/register', $edit, t('Create new account'));
-    $this->assertText(t('The specified passwords do not match.'), 'Typing mismatched passwords displays an error message.');
+    $this->assertText(t('The specified passwords do not match.'), t('Typing mismatched passwords displays an error message.'));
 
     // Enter a correct password.
     $edit['pass[pass1]'] = $new_pass = $this->randomName();
@@ -85,7 +85,7 @@ function testRegistrationWithoutEmailVerification() {
     entity_get_controller('user')->resetCache();
     $accounts = entity_load_multiple_by_properties('user', array('name' => $name, 'mail' => $mail));
     $new_user = reset($accounts);
-    $this->assertText(t('Registration successful. You are now logged in.'), 'Users are logged in after registering.');
+    $this->assertText(t('Registration successful. You are now logged in.'), t('Users are logged in after registering.'));
     $this->drupalLogout();
 
     // Allow registration by site visitors, but require administrator approval.
@@ -96,7 +96,7 @@ function testRegistrationWithoutEmailVerification() {
     $edit['pass[pass1]'] = $pass = $this->randomName();
     $edit['pass[pass2]'] = $pass;
     $this->drupalPost('user/register', $edit, t('Create new account'));
-    $this->assertText(t('Thank you for applying for an account. Your account is currently pending approval by the site administrator.'), 'Users are notified of pending approval');
+    $this->assertText(t('Thank you for applying for an account. Your account is currently pending approval by the site administrator.'), t('Users are notified of pending approval'));
 
     // Try to login before administrator approval.
     $auth = array(
@@ -104,7 +104,7 @@ function testRegistrationWithoutEmailVerification() {
       'pass' => $pass,
     );
     $this->drupalPost('user/login', $auth, t('Log in'));
-    $this->assertText(t('The username @name has not been activated or is blocked.', array('@name' => $name)), 'User cannot login yet.');
+    $this->assertText(t('The username @name has not been activated or is blocked.', array('@name' => $name)), t('User cannot login yet.'));
 
     // Activate the new account.
     $accounts = entity_load_multiple_by_properties('user', array('name' => $name, 'mail' => $mail));
@@ -119,7 +119,7 @@ function testRegistrationWithoutEmailVerification() {
 
     // Login after administrator approval.
     $this->drupalPost('user/login', $auth, t('Log in'));
-    $this->assertText(t('Member for'), 'User can log in after administrator approval.');
+    $this->assertText(t('Member for'), t('User can log in after administrator approval.'));
   }
 
   function testRegistrationEmailDuplicates() {
@@ -139,13 +139,13 @@ function testRegistrationEmailDuplicates() {
 
     // Attempt to create a new account using an existing e-mail address.
     $this->drupalPost('user/register', $edit, t('Create new account'));
-    $this->assertText(t('The e-mail address @email is already registered.', array('@email' => $duplicate_user->mail)), 'Supplying an exact duplicate email address displays an error message');
+    $this->assertText(t('The e-mail address @email is already registered.', array('@email' => $duplicate_user->mail)), t('Supplying an exact duplicate email address displays an error message'));
 
     // Attempt to bypass duplicate email registration validation by adding spaces.
     $edit['mail'] = '   ' . $duplicate_user->mail . '   ';
 
     $this->drupalPost('user/register', $edit, t('Create new account'));
-    $this->assertText(t('The e-mail address @email is already registered.', array('@email' => $duplicate_user->mail)), 'Supplying a duplicate email address with added whitespace displays an error message');
+    $this->assertText(t('The e-mail address @email is already registered.', array('@email' => $duplicate_user->mail)), t('Supplying a duplicate email address with added whitespace displays an error message'));
   }
 
   function testRegistrationDefaultValues() {
@@ -164,7 +164,7 @@ function testRegistrationDefaultValues() {
     // Check that the account information fieldset's options are not displayed
     // is a fieldset if there is not more than one fieldset in the form.
     $this->drupalGet('user/register');
-    $this->assertNoRaw('<fieldset id="edit-account"><legend>Account information</legend>', 'Account settings fieldset was hidden.');
+    $this->assertNoRaw('<fieldset id="edit-account"><legend>Account information</legend>', t('Account settings fieldset was hidden.'));
 
     $edit = array();
     $edit['name'] = $name = $this->randomName();
@@ -176,17 +176,17 @@ function testRegistrationDefaultValues() {
     // Check user fields.
     $accounts = entity_load_multiple_by_properties('user', array('name' => $name, 'mail' => $mail));
     $new_user = reset($accounts);
-    $this->assertEqual($new_user->name, $name, 'Username matches.');
-    $this->assertEqual($new_user->mail, $mail, 'E-mail address matches.');
-    $this->assertEqual($new_user->theme, '', 'Correct theme field.');
-    $this->assertEqual($new_user->signature, '', 'Correct signature field.');
-    $this->assertTrue(($new_user->created > REQUEST_TIME - 20 ), 'Correct creation time.');
-    $this->assertEqual($new_user->status, $config->get('register') == USER_REGISTER_VISITORS ? 1 : 0, 'Correct status field.');
-    $this->assertEqual($new_user->timezone, variable_get('date_default_timezone'), 'Correct time zone field.');
-    $this->assertEqual($new_user->langcode, language_default()->langcode, 'Correct language field.');
-    $this->assertEqual($new_user->preferred_langcode, language_default()->langcode, 'Correct preferred language field.');
-    $this->assertEqual($new_user->picture, 0, 'Correct picture field.');
-    $this->assertEqual($new_user->init, $mail, 'Correct init field.');
+    $this->assertEqual($new_user->name, $name, t('Username matches.'));
+    $this->assertEqual($new_user->mail, $mail, t('E-mail address matches.'));
+    $this->assertEqual($new_user->theme, '', t('Correct theme field.'));
+    $this->assertEqual($new_user->signature, '', t('Correct signature field.'));
+    $this->assertTrue(($new_user->created > REQUEST_TIME - 20 ), t('Correct creation time.'));
+    $this->assertEqual($new_user->status, $config->get('register') == USER_REGISTER_VISITORS ? 1 : 0, t('Correct status field.'));
+    $this->assertEqual($new_user->timezone, variable_get('date_default_timezone'), t('Correct time zone field.'));
+    $this->assertEqual($new_user->langcode, language_default()->langcode, t('Correct language field.'));
+    $this->assertEqual($new_user->preferred_langcode, language_default()->langcode, t('Correct preferred language field.'));
+    $this->assertEqual($new_user->picture, 0, t('Correct picture field.'));
+    $this->assertEqual($new_user->init, $mail, t('Correct init field.'));
   }
 
   /**
@@ -212,13 +212,13 @@ function testRegistrationWithUserFields() {
 
     // Check that the field does not appear on the registration form.
     $this->drupalGet('user/register');
-    $this->assertNoText($instance['label'], 'The field does not appear on user registration form');
+    $this->assertNoText($instance['label'], t('The field does not appear on user registration form'));
 
     // Have the field appear on the registration form.
     $instance['settings']['user_register_form'] = TRUE;
     field_update_instance($instance);
     $this->drupalGet('user/register');
-    $this->assertText($instance['label'], 'The field appears on user registration form');
+    $this->assertText($instance['label'], t('The field appears on user registration form'));
 
     // Check that validation errors are correctly reported.
     $edit = array();
@@ -227,11 +227,11 @@ function testRegistrationWithUserFields() {
     // Missing input in required field.
     $edit['test_user_field[und][0][value]'] = '';
     $this->drupalPost(NULL, $edit, t('Create new account'));
-    $this->assertRaw(t('@name field is required.', array('@name' => $instance['label'])), 'Field validation error was correctly reported.');
+    $this->assertRaw(t('@name field is required.', array('@name' => $instance['label'])), t('Field validation error was correctly reported.'));
     // Invalid input.
     $edit['test_user_field[und][0][value]'] = '-1';
     $this->drupalPost(NULL, $edit, t('Create new account'));
-    $this->assertRaw(t('%name does not accept the value -1.', array('%name' => $instance['label'])), 'Field validation error was correctly reported.');
+    $this->assertRaw(t('%name does not accept the value -1.', array('%name' => $instance['label'])), t('Field validation error was correctly reported.'));
 
     // Submit with valid data.
     $value = rand(1, 255);
@@ -240,7 +240,7 @@ function testRegistrationWithUserFields() {
     // Check user fields.
     $accounts = entity_load_multiple_by_properties('user', array('name' => $name, 'mail' => $mail));
     $new_user = reset($accounts);
-    $this->assertEqual($new_user->test_user_field[LANGUAGE_NOT_SPECIFIED][0]['value'], $value, 'The field value was correclty saved.');
+    $this->assertEqual($new_user->test_user_field[LANGUAGE_NOT_SPECIFIED][0]['value'], $value, t('The field value was correclty saved.'));
 
     // Check that the 'add more' button works.
     $field['cardinality'] = FIELD_CARDINALITY_UNLIMITED;
@@ -268,9 +268,9 @@ function testRegistrationWithUserFields() {
       // Check user fields.
       $accounts = entity_load_multiple_by_properties('user', array('name' => $name, 'mail' => $mail));
       $new_user = reset($accounts);
-      $this->assertEqual($new_user->test_user_field[LANGUAGE_NOT_SPECIFIED][0]['value'], $value, format_string('@js : The field value was correclty saved.', array('@js' => $js)));
-      $this->assertEqual($new_user->test_user_field[LANGUAGE_NOT_SPECIFIED][1]['value'], $value + 1, format_string('@js : The field value was correclty saved.', array('@js' => $js)));
-      $this->assertEqual($new_user->test_user_field[LANGUAGE_NOT_SPECIFIED][2]['value'], $value + 2, format_string('@js : The field value was correclty saved.', array('@js' => $js)));
+      $this->assertEqual($new_user->test_user_field[LANGUAGE_NOT_SPECIFIED][0]['value'], $value, t('@js : The field value was correclty saved.', array('@js' => $js)));
+      $this->assertEqual($new_user->test_user_field[LANGUAGE_NOT_SPECIFIED][1]['value'], $value + 1, t('@js : The field value was correclty saved.', array('@js' => $js)));
+      $this->assertEqual($new_user->test_user_field[LANGUAGE_NOT_SPECIFIED][2]['value'], $value + 2, t('@js : The field value was correclty saved.', array('@js' => $js)));
     }
   }
 }
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserRoleAdminTest.php b/core/modules/user/lib/Drupal/user/Tests/UserRoleAdminTest.php
index 50d4da7..6e0153c 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserRoleAdminTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserRoleAdminTest.php
@@ -39,29 +39,29 @@ function testRoleAdministration() {
     $role_name = '123';
     $edit = array('role[name]' => $role_name, 'role[rid]' => $role_name);
     $this->drupalPost('admin/people/roles', $edit, t('Add role'));
-    $this->assertText(t('The role has been added.'), 'The role has been added.');
+    $this->assertText(t('The role has been added.'), t('The role has been added.'));
     $role = user_role_load($role_name);
-    $this->assertTrue(is_object($role), 'The role was successfully retrieved from the database.');
+    $this->assertTrue(is_object($role), t('The role was successfully retrieved from the database.'));
 
     // Try adding a duplicate role.
     $this->drupalPost(NULL, $edit, t('Add role'));
-    $this->assertRaw(t('The machine-readable name is already in use. It must be unique.'), 'Duplicate role warning displayed.');
+    $this->assertRaw(t('The machine-readable name is already in use. It must be unique.'), t('Duplicate role warning displayed.'));
 
     // Test renaming a role.
     $old_name = $role_name;
     $role_name = '456';
     $edit = array('role[name]' => $role_name);
     $this->drupalPost("admin/people/roles/edit/{$role->rid}", $edit, t('Save role'));
-    $this->assertText(t('The role has been renamed.'), 'The role has been renamed.');
+    $this->assertText(t('The role has been renamed.'), t('The role has been renamed.'));
     $new_role = user_role_load($old_name);
     $this->assertEqual($new_role->name, $role_name, 'The role name has been successfully changed.');
 
     // Test deleting a role.
     $this->drupalPost("admin/people/roles/edit/{$role->rid}", NULL, t('Delete role'));
     $this->drupalPost(NULL, NULL, t('Delete'));
-    $this->assertText(t('The role has been deleted.'), 'The role has been deleted');
-    $this->assertNoLinkByHref("admin/people/roles/edit/{$role->rid}", 'Role edit link removed.');
-    $this->assertFalse(user_role_load($role_name), 'A deleted role can no longer be loaded.');
+    $this->assertText(t('The role has been deleted.'), t('The role has been deleted'));
+    $this->assertNoLinkByHref("admin/people/roles/edit/{$role->rid}", t('Role edit link removed.'));
+    $this->assertFalse(user_role_load($role_name), t('A deleted role can no longer be loaded.'));
 
     // Make sure that the system-defined roles can be edited via the user
     // interface.
@@ -87,11 +87,11 @@ function testRoleWeightChange() {
     // Change the role weight and submit the form.
     $edit = array('roles['. $rid .'][weight]' => $old_weight + 1);
     $this->drupalPost('admin/people/roles', $edit, t('Save order'));
-    $this->assertText(t('The role settings have been updated.'), 'The role settings form submitted successfully.');
+    $this->assertText(t('The role settings have been updated.'), t('The role settings form submitted successfully.'));
 
     // Retrieve the saved role and compare its weight.
     $role = user_role_load($rid);
     $new_weight = $role->weight;
-    $this->assertTrue(($old_weight + 1) == $new_weight, 'Role weight updated successfully.');
+    $this->assertTrue(($old_weight + 1) == $new_weight, t('Role weight updated successfully.'));
   }
 }
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserRolesAssignmentTest.php b/core/modules/user/lib/Drupal/user/Tests/UserRolesAssignmentTest.php
index 349b2a9..eaabdd2 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserRolesAssignmentTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserRolesAssignmentTest.php
@@ -17,9 +17,9 @@ class UserRolesAssignmentTest extends WebTestBase {
 
   public static function getInfo() {
     return array(
-      'name' => 'Role assignment',
-      'description' => 'Tests that users can be assigned and unassigned roles.',
-      'group' => 'User'
+      'name' => t('Role assignment'),
+      'description' => t('Tests that users can be assigned and unassigned roles.'),
+      'group' => t('User')
     );
   }
 
@@ -40,13 +40,13 @@ function testAssignAndRemoveRole()  {
     // Assign the role to the user.
     $this->drupalPost('user/' . $account->uid . '/edit', array("roles[$rid]" => $rid), t('Save'));
     $this->assertText(t('The changes have been saved.'));
-    $this->assertFieldChecked('edit-roles-' . $rid, 'Role is assigned.');
+    $this->assertFieldChecked('edit-roles-' . $rid, t('Role is assigned.'));
     $this->userLoadAndCheckRoleAssigned($account, $rid);
 
     // Remove the role from the user.
     $this->drupalPost('user/' . $account->uid . '/edit', array("roles[$rid]" => FALSE), t('Save'));
     $this->assertText(t('The changes have been saved.'));
-    $this->assertNoFieldChecked('edit-roles-' . $rid, 'Role is removed from user.');
+    $this->assertNoFieldChecked('edit-roles-' . $rid, t('Role is removed from user.'));
     $this->userLoadAndCheckRoleAssigned($account, $rid, FALSE);
   }
 
@@ -70,13 +70,13 @@ function testCreateUserWithRole() {
     $account = user_load_by_name($edit['name']);
 
     $this->drupalGet('user/' . $account->uid . '/edit');
-    $this->assertFieldChecked('edit-roles-' . $rid, 'Role is assigned.');
+    $this->assertFieldChecked('edit-roles-' . $rid, t('Role is assigned.'));
     $this->userLoadAndCheckRoleAssigned($account, $rid);
 
     // Remove the role again.
     $this->drupalPost('user/' . $account->uid . '/edit', array("roles[$rid]" => FALSE), t('Save'));
     $this->assertText(t('The changes have been saved.'));
-    $this->assertNoFieldChecked('edit-roles-' . $rid, 'Role is removed from user.');
+    $this->assertNoFieldChecked('edit-roles-' . $rid, t('Role is removed from user.'));
     $this->userLoadAndCheckRoleAssigned($account, $rid, FALSE);
   }
 
@@ -94,10 +94,10 @@ function testCreateUserWithRole() {
   private function userLoadAndCheckRoleAssigned($account, $rid, $is_assigned = TRUE) {
     $account = user_load($account->uid, TRUE);
     if ($is_assigned) {
-      $this->assertTrue(array_key_exists($rid, $account->roles), 'The role is present in the user object.');
+      $this->assertTrue(array_key_exists($rid, $account->roles), t('The role is present in the user object.'));
     }
     else {
-      $this->assertFalse(array_key_exists($rid, $account->roles), 'The role is not present in the user object.');
+      $this->assertFalse(array_key_exists($rid, $account->roles), t('The role is not present in the user object.'));
     }
   }
 }
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserSaveTest.php b/core/modules/user/lib/Drupal/user/Tests/UserSaveTest.php
index 6f975c2..655651f 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserSaveTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserSaveTest.php
@@ -44,9 +44,9 @@ function testUserImport() {
 
     // Test if created user exists.
     $user_by_uid = user_load($test_uid);
-    $this->assertTrue($user_by_uid, 'Loading user by uid.');
+    $this->assertTrue($user_by_uid, t('Loading user by uid.'));
 
     $user_by_name = user_load_by_name($test_name);
-    $this->assertTrue($user_by_name, 'Loading user by name.');
+    $this->assertTrue($user_by_name, t('Loading user by name.'));
   }
 }
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserTimeZoneTest.php b/core/modules/user/lib/Drupal/user/Tests/UserTimeZoneTest.php
index f692706..3ff4daf 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserTimeZoneTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserTimeZoneTest.php
@@ -46,25 +46,25 @@ function testUserTimeZone() {
 
     // Confirm date format and time zone.
     $this->drupalGet("node/$node1->nid");
-    $this->assertText('2007-03-09 21:00 PST', 'Date should be PST.');
+    $this->assertText('2007-03-09 21:00 PST', t('Date should be PST.'));
     $this->drupalGet("node/$node2->nid");
-    $this->assertText('2007-03-11 01:00 PST', 'Date should be PST.');
+    $this->assertText('2007-03-11 01:00 PST', t('Date should be PST.'));
     $this->drupalGet("node/$node3->nid");
-    $this->assertText('2007-03-20 21:00 PDT', 'Date should be PDT.');
+    $this->assertText('2007-03-20 21:00 PDT', t('Date should be PDT.'));
 
     // Change user time zone to Santiago time.
     $edit = array();
     $edit['mail'] = $web_user->mail;
     $edit['timezone'] = 'America/Santiago';
     $this->drupalPost("user/$web_user->uid/edit", $edit, t('Save'));
-    $this->assertText(t('The changes have been saved.'), 'Time zone changed to Santiago time.');
+    $this->assertText(t('The changes have been saved.'), t('Time zone changed to Santiago time.'));
 
     // Confirm date format and time zone.
     $this->drupalGet("node/$node1->nid");
-    $this->assertText('2007-03-10 02:00 CLST', 'Date should be Chile summer time; five hours ahead of PST.');
+    $this->assertText('2007-03-10 02:00 CLST', t('Date should be Chile summer time; five hours ahead of PST.'));
     $this->drupalGet("node/$node2->nid");
-    $this->assertText('2007-03-11 05:00 CLT', 'Date should be Chile time; four hours ahead of PST');
+    $this->assertText('2007-03-11 05:00 CLT', t('Date should be Chile time; four hours ahead of PST'));
     $this->drupalGet("node/$node3->nid");
-    $this->assertText('2007-03-21 00:00 CLT', 'Date should be Chile time; three hours ahead of PDT.');
+    $this->assertText('2007-03-21 00:00 CLT', t('Date should be Chile time; three hours ahead of PDT.'));
   }
 }
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserTokenReplaceTest.php b/core/modules/user/lib/Drupal/user/Tests/UserTokenReplaceTest.php
index d14e826..3daa476 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserTokenReplaceTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserTokenReplaceTest.php
@@ -72,11 +72,11 @@ function testUserTokenReplacement() {
     $tests['[current-user:name]'] = check_plain(user_format_name($global_account));
 
     // Test to make sure that we generated something for each token.
-    $this->assertFalse(in_array(0, array_map('strlen', $tests)), 'No empty tokens generated.');
+    $this->assertFalse(in_array(0, array_map('strlen', $tests)), t('No empty tokens generated.'));
 
     foreach ($tests as $input => $expected) {
       $output = token_replace($input, array('user' => $account), array('langcode' => $language_interface->langcode));
-      $this->assertEqual($output, $expected, format_string('Sanitized user token %token replaced.', array('%token' => $input)));
+      $this->assertEqual($output, $expected, t('Sanitized user token %token replaced.', array('%token' => $input)));
     }
 
     // Generate and test unsanitized tokens.
@@ -86,7 +86,7 @@ function testUserTokenReplacement() {
 
     foreach ($tests as $input => $expected) {
       $output = token_replace($input, array('user' => $account), array('langcode' => $language_interface->langcode, 'sanitize' => FALSE));
-      $this->assertEqual($output, $expected, format_string('Unsanitized user token %token replaced.', array('%token' => $input)));
+      $this->assertEqual($output, $expected, t('Unsanitized user token %token replaced.', array('%token' => $input)));
     }
 
     // Generate login and cancel link.
