diff --git a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
index 2108b67..cea7065 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
@@ -8,6 +8,7 @@
 namespace Drupal\simpletest;
 
 use Drupal\Component\Utility\Random;
+use Drupal\Component\Utility\String;
 use Drupal\Core\Database\Database;
 use Drupal\Component\Utility\Settings;
 use Drupal\Core\Config\ConfigImporter;
@@ -20,6 +21,8 @@
 use Drupal\Core\StreamWrapper\PublicStream;
 use Symfony\Component\HttpFoundation\Request;
 
+require_once(__DIR__ . '/../../../../../includes/errors.inc');
+
 /**
  * Base class for Drupal tests.
  *
@@ -187,6 +190,13 @@
   protected $randomGenerator;
 
   /**
+   * A string translation service for our own use.
+   *
+   * @var \Drupal\Core\StringTranslation\TranslationInterface
+   */
+  protected $stringTranslation;
+
+  /**
    * Constructor for Test.
    *
    * @param $test_id
@@ -197,6 +207,18 @@ public function __construct($test_id = NULL) {
   }
 
   /**
+   * Translates a string.
+   *
+   * See the t() documentation for details.
+   */
+  protected function t($string, array $args = array(), array $options = array()) {
+    if (empty($this->stringTranslation)) {
+      $this->stringTranslation = \Drupal::translation();
+    }
+    return $this->stringTranslation->translate($string, $args, $options);
+  }
+
+  /**
    * Provides meta information about this test case, such as test name.
    *
    * @return array
@@ -212,7 +234,7 @@ public static function getInfo() {
     // PHP does not allow us to declare this method as abstract public static,
     // so we simply throw an exception here if this has not been implemented by
     // a child class.
-    throw new \RuntimeException("Sub-class must implement the getInfo method!");
+    throw new \RuntimeException("Sub-classes of TestBase must implement the getInfo() method!");
   }
 
   /**
@@ -231,6 +253,23 @@ protected function checkRequirements() {
   }
 
   /**
+   * Helper method to store an assertion record in the configured database.
+   *
+   * This method decouples database access from assertion logic.
+   *
+   * @param array $assertion
+   *   Keyed array representing an assertion, as generated by assert().
+   *
+   * @see assert()
+   */
+  protected function storeAssertion($assertion) {
+    return self::getDatabaseConnection()
+      ->insert('simpletest')
+      ->fields($assertion)
+      ->execute();
+  }
+
+  /**
    * Internal helper: stores the assert.
    *
    * @param $status
@@ -279,10 +318,7 @@ protected function assert($status, $message = '', $group = 'Other', array $calle
     );
 
     // Store assertion for display after the test has completed.
-    self::getDatabaseConnection()
-      ->insert('simpletest')
-      ->fields($assertion)
-      ->execute();
+    $this->storeAssertion($assertion);
 
     // We do not use a ternary operator here to allow a breakpoint on
     // test failure.
@@ -397,7 +433,7 @@ protected function getAssertionCall() {
       array_shift($backtrace);
     }
 
-    return _drupal_get_last_caller($backtrace);
+    return \_drupal_get_last_caller($backtrace);
   }
 
   /**
@@ -421,7 +457,7 @@ protected function getAssertionCall() {
    *   TRUE if the assertion succeeded, FALSE otherwise.
    */
   protected function assertTrue($value, $message = '', $group = 'Other') {
-    return $this->assert((bool) $value, $message ? $message : t('Value @value is TRUE.', array('@value' => var_export($value, TRUE))), $group);
+    return $this->assert((bool) $value, $message ? $message : $this->t('Value @value is TRUE.', array('@value' => var_export($value, TRUE))), $group);
   }
 
   /**
@@ -445,7 +481,7 @@ protected function assertTrue($value, $message = '', $group = 'Other') {
    *   TRUE if the assertion succeeded, FALSE otherwise.
    */
   protected function assertFalse($value, $message = '', $group = 'Other') {
-    return $this->assert(!$value, $message ? $message : t('Value @value is FALSE.', array('@value' => var_export($value, TRUE))), $group);
+    return $this->assert(!$value, $message ? $message : $this->t('Value @value is FALSE.', array('@value' => var_export($value, TRUE))), $group);
   }
 
   /**
@@ -467,7 +503,7 @@ protected function assertFalse($value, $message = '', $group = 'Other') {
    *   TRUE if the assertion succeeded, FALSE otherwise.
    */
   protected function assertNull($value, $message = '', $group = 'Other') {
-    return $this->assert(!isset($value), $message ? $message : t('Value @value is NULL.', array('@value' => var_export($value, TRUE))), $group);
+    return $this->assert(!isset($value), $message ? $message : $this->t('Value @value is NULL.', array('@value' => var_export($value, TRUE))), $group);
   }
 
   /**
@@ -489,7 +525,7 @@ protected function assertNull($value, $message = '', $group = 'Other') {
    *   TRUE if the assertion succeeded, FALSE otherwise.
    */
   protected function assertNotNull($value, $message = '', $group = 'Other') {
-    return $this->assert(isset($value), $message ? $message : t('Value @value is not NULL.', array('@value' => var_export($value, TRUE))), $group);
+    return $this->assert(isset($value), $message ? $message : $this->t('Value @value is not NULL.', array('@value' => var_export($value, TRUE))), $group);
   }
 
   /**
@@ -513,7 +549,7 @@ protected function assertNotNull($value, $message = '', $group = 'Other') {
    *   TRUE if the assertion succeeded, FALSE otherwise.
    */
   protected function assertEqual($first, $second, $message = '', $group = 'Other') {
-    return $this->assert($first == $second, $message ? $message : t('Value @first is equal to value @second.', array('@first' => var_export($first, TRUE), '@second' => var_export($second, TRUE))), $group);
+    return $this->assert($first == $second, $message ? $message : $this->t('Value @first is equal to value @second.', array('@first' => var_export($first, TRUE), '@second' => var_export($second, TRUE))), $group);
   }
 
   /**
@@ -537,7 +573,7 @@ protected function assertEqual($first, $second, $message = '', $group = 'Other')
    *   TRUE if the assertion succeeded, FALSE otherwise.
    */
   protected function assertNotEqual($first, $second, $message = '', $group = 'Other') {
-    return $this->assert($first != $second, $message ? $message : t('Value @first is not equal to value @second.', array('@first' => var_export($first, TRUE), '@second' => var_export($second, TRUE))), $group);
+    return $this->assert($first != $second, $message ? $message :$this->t('Value @first is not equal to value @second.', array('@first' => var_export($first, TRUE), '@second' => var_export($second, TRUE))), $group);
   }
 
   /**
@@ -561,7 +597,7 @@ protected function assertNotEqual($first, $second, $message = '', $group = 'Othe
    *   TRUE if the assertion succeeded, FALSE otherwise.
    */
   protected function assertIdentical($first, $second, $message = '', $group = 'Other') {
-    return $this->assert($first === $second, $message ? $message : t('Value @first is identical to value @second.', array('@first' => var_export($first, TRUE), '@second' => var_export($second, TRUE))), $group);
+    return $this->assert($first === $second, $message ? $message :$this->t('Value @first is identical to value @second.', array('@first' => var_export($first, TRUE), '@second' => var_export($second, TRUE))), $group);
   }
 
   /**
@@ -585,7 +621,7 @@ protected function assertIdentical($first, $second, $message = '', $group = 'Oth
    *   TRUE if the assertion succeeded, FALSE otherwise.
    */
   protected function assertNotIdentical($first, $second, $message = '', $group = 'Other') {
-    return $this->assert($first !== $second, $message ? $message : t('Value @first is not identical to value @second.', array('@first' => var_export($first, TRUE), '@second' => var_export($second, TRUE))), $group);
+    return $this->assert($first !== $second, $message ? $message :$this->t('Value @first is not identical to value @second.', array('@first' => var_export($first, TRUE), '@second' => var_export($second, TRUE))), $group);
   }
 
   /**
@@ -609,10 +645,12 @@ protected function assertNotIdentical($first, $second, $message = '', $group = '
    *   TRUE if the assertion succeeded, FALSE otherwise.
    */
   protected function assertIdenticalObject($object1, $object2, $message = '', $group = 'Other') {
-    $message = $message ?: format_string('!object1 is identical to !object2', array(
-      '!object1' => var_export($object1, TRUE),
-      '!object2' => var_export($object2, TRUE),
-    ));
+    $message = $message ?: String::format(
+      '!object1 is identical to !object2', array(
+        '!object1' => var_export($object1, TRUE),
+        '!object2' => var_export($object2, TRUE),
+        )
+    );
     $identical = TRUE;
     foreach ($object1 as $key => $value) {
       $identical = $identical && isset($object2->$key) && $object2->$key === $value;
@@ -713,7 +751,7 @@ protected function verbose($message) {
       $url = $this->verboseDirectoryUrl . '/' . $this->verboseClassName . '-' . $this->verboseId . '.html';
       // Not using l() to avoid invoking the theme system, so that unit tests
       // can use verbose() as well.
-      $url = '<a href="' . $url . '" target="_blank">' . t('Verbose message') . '</a>';
+      $url = '<a href="' . $url . '" target="_blank">' . $this->t('Verbose message') . '</a>';
       $this->error($url, 'User notice');
     }
     $this->verboseId++;
@@ -787,7 +825,7 @@ public function run(array $methods = array()) {
             'line' => $method_info->getStartLine(),
             'function' => $class . '->' . $method . '()',
           );
-          $completion_check_id = TestBase::insertAssert($this->testId, $class, FALSE, t('The test did not complete due to a fatal error.'), 'Completion check', $caller);
+          $completion_check_id = TestBase::insertAssert($this->testId, $class, FALSE, $this->t('The test did not complete due to a fatal error.'), 'Completion check', $caller);
           $this->setUp();
           if ($this->setup) {
             try {
@@ -1079,7 +1117,7 @@ protected function tearDown() {
       $emailCount = count($captured_emails);
       if ($emailCount) {
         $message = format_plural($emailCount, '1 e-mail was sent during this test.', '@count e-mails were sent during this test.');
-        $this->pass($message, t('E-mail'));
+        $this->pass($message, $this->t('E-mail'));
       }
     }
 
@@ -1156,7 +1194,6 @@ protected function tearDown() {
    */
   public function errorHandler($severity, $message, $file = NULL, $line = NULL) {
     if ($severity & error_reporting()) {
-      require_once DRUPAL_ROOT . '/core/includes/errors.inc';
       $error_map = array(
         E_STRICT => 'Run-time notice',
         E_WARNING => 'Warning',
@@ -1180,7 +1217,7 @@ public function errorHandler($severity, $message, $file = NULL, $line = NULL) {
         $message .= '<pre class="backtrace">' . format_backtrace($verbose_backtrace) . '</pre>';
       }
 
-      $this->error($message, $error_map[$severity], _drupal_get_last_caller($backtrace));
+      $this->error($message, $error_map[$severity], \_drupal_get_last_caller($backtrace));
     }
     return TRUE;
   }
@@ -1191,7 +1228,6 @@ public function errorHandler($severity, $message, $file = NULL, $line = NULL) {
    * @see set_exception_handler
    */
   protected function exceptionHandler($exception) {
-    require_once DRUPAL_ROOT . '/core/includes/errors.inc';
     $backtrace = $exception->getTrace();
     $verbose_backtrace = $backtrace;
     // Push on top of the backtrace the call that generated the exception.
@@ -1201,12 +1237,12 @@ protected function exceptionHandler($exception) {
     ));
     // The exception message is run through check_plain()
     // by _drupal_decode_exception().
-    $decoded_exception = _drupal_decode_exception($exception);
+    $decoded_exception = \_drupal_decode_exception($exception);
     unset($decoded_exception['backtrace']);
     $message = format_string('%type: !message in %function (line %line of %file). <pre class="backtrace">!backtrace</pre>', $decoded_exception + array(
       '!backtrace' => format_backtrace($verbose_backtrace),
     ));
-    $this->error($message, 'Uncaught exception', _drupal_get_last_caller($backtrace));
+    $this->error($message, 'Uncaught exception', \_drupal_get_last_caller($backtrace));
   }
 
   /**
diff --git a/core/modules/simpletest/tests/Drupal/simpletest/Tests/TestBaseTest.php b/core/modules/simpletest/tests/Drupal/simpletest/Tests/TestBaseTest.php
index d645149..fef52ee 100644
--- a/core/modules/simpletest/tests/Drupal/simpletest/Tests/TestBaseTest.php
+++ b/core/modules/simpletest/tests/Drupal/simpletest/Tests/TestBaseTest.php
@@ -8,9 +8,13 @@
 namespace Drupal\simpletest\Tests;
 
 use Drupal\Tests\UnitTestCase;
+use Drupal\simpletest\TestBase;
 
 /**
  * Tests helper methods provided by the abstract TestBase class.
+ *
+ * @group Drupal
+ * @group simpletest
  */
 class TestBaseTest extends UnitTestCase {
 
@@ -26,7 +30,6 @@ public static function getInfo() {
       'name' => 'TestBase helper functions test',
       'description' => 'Test helper functions provided by the TestBase abstract class.',
       'group' => 'Simpletest',
-
     );
   }
 
@@ -40,7 +43,7 @@ protected function setUp() {
    * @return array
    *   An array of values passed to the test method.
    */
-  public function randomStringValidateProvider () {
+  public function randomStringValidateProvider() {
     return array(
       array(' curry paste', FALSE),
       array('curry paste ', FALSE),
@@ -68,4 +71,420 @@ public function testRandomStringValidate($string, $expected) {
     $this->assertEquals($expected, $actual);
   }
 
+  /**
+   * Test that getInfo() throws an exception.
+   *
+   * @expectedException \RuntimeException
+   */
+  public function testGetInfoException() {
+    $testBase = $this->getMockBuilder('Drupal\simpletest\TestBase')
+        ->setConstructorArgs(array('test_id'))
+        ->getMockForAbstractClass();
+    $testBase = $this->getMockForAbstractClass('Drupal\simpletest\TestBase');
+    $testBase->getInfo();
+  }
+
+  /**
+   * Helper method for constructing a mock TestBase object.
+   *
+   * TestBase is abstract, so we have to mock it. We'll also
+   * mock the storeAssertion() method so we don't need the database.
+   * And we'll also populate the stringTranslation property so that
+   * t() works.
+   *
+   * @return object
+   *   Mock of Drupal\simpletest\TestBase.
+   */
+  public function getTestBaseForAssertionTests($test_id = 'test_id') {
+    $mockTestBase = $this->getMockBuilder('Drupal\simpletest\TestBase')
+        ->setConstructorArgs(array($test_id))
+        ->setMethods(array('storeAssertion'))
+        ->getMockForAbstractClass();
+    // Override storeAssertion() so we don't need a database.
+    $mockTestBase->expects($this->any())
+        ->method('storeAssertion')
+        ->will($this->returnValue(NULL));
+    // Provide a mock translation service so t() works.
+    $ref_translate = new \ReflectionProperty($mockTestBase, 'stringTranslation');
+    $ref_translate->setAccessible(TRUE);
+    $assertions = $ref_translate->setValue($mockTestBase, $this->getStringTranslationStub());
+    return $mockTestBase;
+  }
+
+  /**
+   * Invoke methods that are protected or private.
+   *
+   * @param object $object
+   *   Object on which to invoke the method.
+   * @param string $methodName
+   *   Name of the method to invoke.
+   * @param array $arguments
+   *   Array of arguments to be passed to the method.
+   *
+   * @return mixed
+   *   Value returned by the invoked method.
+   */
+  public function invokeProtectedMethod($object, $methodName, array $arguments) {
+    $ref_method = new \ReflectionMethod($object, $methodName);
+    $ref_method->setAccessible(TRUE);
+    return $ref_method->invokeArgs($object, $arguments);
+  }
+
+  /**
+   * Test checkRequirements().
+   */
+  public function testCheckRequirements() {
+    $testBase = $this->getTestBaseForAssertionTests();
+    $this->assertInternalType(
+        'array',
+        $this->invokeProtectedMethod($testBase, 'checkRequirements', array())
+    );
+  }
+
+  /**
+   * Data provider for testAssert().
+   *
+   * @return array
+   *   Standard dataProvider array of arrays:
+   *   - Expected result from assert().
+   *   - Expected status stored in TestBase->assertions.
+   *   - Status, passed to assert().
+   *   - Message, passed to assert().
+   *   - Group, passed to assert().
+   *   - Caller, passed to assert().
+   */
+  public function providerTestAssert() {
+    return array(
+      array(TRUE, 'pass', TRUE, 'Yay pass', 'test', array()),
+      array(FALSE, 'fail', FALSE, 'Boo fail', 'test', array()),
+      array(TRUE, 'pass', 'pass', 'Yay pass', 'test', array()),
+      array(FALSE, 'fail', 'fail', 'Boo fail', 'test', array()),
+      array(FALSE, 'exception', 'exception', 'Boo fail', 'test', array()),
+      array(FALSE, 'debug', 'debug', 'Boo fail', 'test', array()),
+    );
+  }
+
+  /**
+   * Test the assert() method.
+   *
+   * @dataProvider providerTestAssert
+   */
+  public function testAssert($expected, $assertionStatus, $status, $message, $group, $caller) {
+    $test_id = 'test_id';
+    $testBase = $this->getTestBaseForAssertionTests($test_id);
+
+    // Verify some startup values.
+    $this->assertAttributeEmpty('assertions', $testBase);
+    if (is_string($status)) {
+      $this->assertEquals(0, $testBase->results['#' . $status]);
+    }
+
+    // assert() is protected so we have to make it accessible.
+    $ref_assert = new \ReflectionMethod($testBase, 'assert');
+    $ref_assert->setAccessible(TRUE);
+    // Call assert() from within our hall of mirrors.
+    $this->assertEquals(
+        $expected,
+        $ref_assert->invokeArgs($testBase, array($status, $message, $group, $caller))
+    );
+
+    // Check the side-effects of assert().
+    if (is_string($status)) {
+      $this->assertEquals(1, $testBase->results['#' . $status]);
+    }
+    $this->assertAttributeNotEmpty('assertions', $testBase);
+    // Make a ReflectionProperty for the assertions property,
+    // since it's protected.
+    $ref_assertions = new \ReflectionProperty($testBase, 'assertions');
+    $ref_assertions->setAccessible(TRUE);
+    $assertions = $ref_assertions->getValue($testBase);
+    $assertion = reset($assertions);
+    $this->assertEquals($assertionStatus, $assertion['status']);
+    $this->assertEquals($test_id, $assertion['test_id']);
+    $this->assertEquals(get_class($testBase), $assertion['test_class']);
+    $this->assertEquals($message, $assertion['message']);
+    $this->assertEquals($group, $assertion['message_group']);
+  }
+
+  /**
+   * Data provider for assertTrue().
+   */
+  public function providerTestAssertTrue() {
+    return array(
+      array(TRUE, TRUE),
+      array(FALSE, FALSE),
+    );
+  }
+
+  /**
+   * Test assertTrue().
+   *
+   * @dataProvider providerTestAssertTrue
+   */
+  public function testAssertTrue($expected, $value) {
+    $testBase = $this->getTestBaseForAssertionTests();
+    $this->assertEquals(
+        $expected,
+        $this->invokeProtectedMethod($testBase, 'assertTrue', array($value))
+    );
+  }
+
+  /**
+   * Test assertFalse().
+   *
+   * @dataProvider providerTestAssertTrue
+   */
+  public function testAssertFalse($expected, $value) {
+    $testBase = $this->getTestBaseForAssertionTests();
+    $this->assertEquals(
+        (!$expected),
+        $this->invokeProtectedMethod($testBase, 'assertFalse', array($value))
+    );
+  }
+
+  /**
+   * Data provider for assertNull().
+   */
+  public function providerTestAssertNull() {
+    return array(
+      array(TRUE, NULL),
+      array(FALSE, ''),
+    );
+  }
+
+  /**
+   * Test assertNull().
+   *
+   * @dataProvider providerTestAssertNull
+   */
+  public function testAssertNull($expected, $value) {
+    $testBase = $this->getTestBaseForAssertionTests();
+    $this->assertEquals(
+        $expected,
+        $this->invokeProtectedMethod($testBase, 'assertNull', array($value))
+    );
+  }
+
+  /**
+   * Test assertNotNull().
+   *
+   * @dataProvider providerTestAssertNull
+   */
+  public function testAssertNotNull($expected, $value) {
+    $testBase = $this->getTestBaseForAssertionTests();
+    $this->assertEquals(
+        (!$expected),
+        $this->invokeProtectedMethod($testBase, 'assertNotNull', array($value))
+    );
+  }
+
+  /**
+   * Data provider for testAssertEqual().
+   */
+  public function providerTestAssertEqual() {
+    return array(
+      array(TRUE, 0, 0),
+      array(FALSE, 'foof', 'yay'),
+    );
+  }
+
+  /**
+   * Test assertEqual().
+   *
+   * @dataProvider providerTestAssertEqual
+   */
+  public function testAssertEqual($expected, $first, $second) {
+    $testBase = $this->getTestBaseForAssertionTests();
+    $this->assertEquals(
+        $expected,
+        $this->invokeProtectedMethod($testBase, 'assertEqual', array($first, $second))
+    );
+  }
+
+  /**
+   * Test assertNotEqual().
+   *
+   * @dataProvider providerTestAssertEqual
+   */
+  public function testAssertNotEqual($expected, $first, $second) {
+    $testBase = $this->getTestBaseForAssertionTests();
+    $this->assertEquals(
+        (!$expected),
+        $this->invokeProtectedMethod($testBase, 'assertNotEqual', array($first, $second))
+    );
+  }
+
+  /**
+   * Data provider for testAssertEqual().
+   */
+  public function providerTestAssertIdentical() {
+    return array(
+      array(TRUE, 0, 0),
+      array(FALSE, 'foof', 'yay'),
+    );
+  }
+
+  /**
+   * Test assertIdentical().
+   *
+   * @dataProvider providerTestAssertIdentical
+   */
+  public function testAssertIdentical($expected, $first, $second) {
+    $testBase = $this->getTestBaseForAssertionTests();
+    $this->assertEquals(
+        $expected,
+        $this->invokeProtectedMethod($testBase, 'assertIdentical', array($first, $second))
+    );
+  }
+
+  /**
+   * Test assertNotIdentical().
+   *
+   * @dataProvider providerTestAssertIdentical
+   */
+  public function testAssertNotIdentical($expected, $first, $second) {
+    $testBase = $this->getTestBaseForAssertionTests();
+    $this->assertEquals(
+        (!$expected),
+        $this->invokeProtectedMethod($testBase, 'assertNotIdentical', array($first, $second))
+    );
+  }
+
+  /**
+   * Data provider for testAssertIdenticalObject().
+   */
+  public function providerTestAssertIdenticalObject() {
+    $obj1 = new \stdClass();
+    $obj1->foof = 'yay';
+    $obj2 = $obj1;
+    $obj3 = clone $obj1;
+    $obj4 = new \stdClass();
+    return array(
+      array(TRUE, $obj1, $obj2),
+      array(TRUE, $obj1, $obj3),
+      array(FALSE, $obj1, $obj4),
+    );
+  }
+
+  /**
+   * Test assertIdenticalObject().
+   *
+   * @dataProvider providerTestAssertIdenticalObject
+   */
+  public function testAssertIdenticalObject($expected, $first, $second) {
+    $testBase = $this->getTestBaseForAssertionTests();
+    $this->assertEquals(
+      $expected,
+      $this->invokeProtectedMethod($testBase, 'assertIdenticalObject', array($first, $second))
+    );
+  }
+
+  /**
+   * Test pass().
+   */
+  public function testPass() {
+    $testBase = $this->getTestBaseForAssertionTests();
+    $this->assertEquals(
+        TRUE,
+        $this->invokeProtectedMethod($testBase, 'pass', array())
+    );
+  }
+
+  /**
+   * Test fail().
+   */
+  public function testFail() {
+    $testBase = $this->getTestBaseForAssertionTests();
+    $this->assertEquals(
+        FALSE,
+        $this->invokeProtectedMethod($testBase, 'fail', array())
+    );
+  }
+
+  /**
+   * Data provider for testError().
+   *
+   * @return array
+   *   Groups for use in assert().
+   */
+  public function providerTestError() {
+    return array(
+      array('User notice'),
+      array('Not User notice'),
+    );
+  }
+
+  /**
+   * Test error().
+   *
+   * @dataProvider providerTestError
+   *
+   * @param string $group
+   *   Group name to test.
+   */
+  public function testError($group) {
+    $testBase = $this->getTestBaseForAssertionTests();
+    $this->assertEquals(
+        FALSE,
+        $this->invokeProtectedMethod($testBase, 'error', array('msg', $group))
+    );
+  }
+
+  /**
+   * Test randomString().
+   */
+  public function testRandomString() {
+    $testBase = $this->getTestBaseForAssertionTests();
+    $this->assertEquals(8, strlen($testBase->randomString()));
+  }
+
+  /**
+   * Test randomName().
+   */
+  public function testRandomName() {
+    $testBase = $this->getTestBaseForAssertionTests();
+    $this->assertEquals(8, strlen($testBase->randomName()));
+  }
+
+  /**
+   * Test randomObject().
+   */
+  public function testRandomObject() {
+    $testBase = $this->getTestBaseForAssertionTests();
+    // Note: count((array)object) works for now, maybe not later.
+    $this->assertEquals(4, count((array) $testBase->randomObject()));
+  }
+
+  /**
+   * Test getRandomGenerator().
+   */
+  public function testGetRandomGenerator() {
+    $testBase = $this->getTestBaseForAssertionTests();
+    $this->assertInstanceOf(
+        'Drupal\Component\Utility\Random',
+        $this->invokeProtectedMethod($testBase, 'getRandomGenerator', array())
+    );
+  }
+
+  /**
+   * Test copyConfig().
+   */
+  public function testCopyConfig() {
+    $mockStorageSource = $this->getMock('Drupal\Core\Config\StorageInterface');
+    $mockStorageSource->expects($this->any())
+      ->method('deleteAll');
+    $mockStorageSource->expects($this->any())
+      ->method('listAll')
+      ->will($this->returnValue(array('name')));
+    $mockStorageTarget = clone $mockStorageSource;
+    $mockStorageSource->expects($this->any())
+      ->method('read')
+      ->will($this->returnValue(array('thing')));
+    $mockStorageTarget->expects($this->any())
+      ->method('write');
+
+    $testBase = $this->getTestBaseForAssertionTests();
+    $this->assertNull($testBase->copyConfig($mockStorageSource, $mockStorageTarget));
+  }
+
 }
