diff --git a/core/CHANGELOG.txt b/core/CHANGELOG.txt
index 562e3b0d9aaaeca9b4fc9c296e068d7bb491d185..88ea5168e3d40238eec00943cb2e05500a527d00 100644
--- a/core/CHANGELOG.txt
+++ b/core/CHANGELOG.txt
@@ -1,6 +1,10 @@
 
 Drupal 8.0, xxxx-xx-xx (development version)
 ----------------------
+- Configuration:
+    * Added a centralized file-based configuration system.
+    * Allows module authors to provide configuration in a standard format.
+    * Implements functionality to get, set, add and remove configuration.
 - Included the HTML5 Shiv library to support HTML5 elements in IE 8 and below.
 - Included the following Symfony2 components:
     * ClassLoader - PSR-0-compatible autoload routines.
diff --git a/core/includes/config.inc b/core/includes/config.inc
index 5e6fa0083a30c085f08f0e8eef61901e70c2e096..78d12e8dd690b8958614d93fa90c5287515274fd 100644
--- a/core/includes/config.inc
+++ b/core/includes/config.inc
@@ -1,6 +1,6 @@
 <?php
 
-use Drupal\Core\Config\DrupalVerifiedStorageSQL;
+use Drupal\Core\Config\DatabaseStorage;
 
 /**
  * @file
@@ -17,7 +17,7 @@ function config_get_config_directory() {
   global $config_directory_name;
 
   if ($test_prefix = drupal_valid_test_ua()) {
-    // @see DrupalWebTestCase::setUp()
+    // @see Drupal\simpletest\WebTestBase::setUp()
     $path = conf_path() . '/files/simpletest/' . substr($test_prefix, 10) . '/config';
   }
   else {
@@ -48,8 +48,8 @@ function config_install_default_config($module) {
       $file = array_pop($parts);
       $config_name = str_replace('.xml', '', $file);
 
-      $verified_storage = new DrupalVerifiedStorageSQL($config_name);
-      $verified_storage->write(file_get_contents($module_config_dir . '/' . $file));
+      $storage = new DatabaseStorage($config_name);
+      $storage->write(file_get_contents($module_config_dir . '/' . $file));
     }
   }
 }
@@ -88,8 +88,8 @@ function config_get_files_with_prefix($prefix = '') {
  * @return
  *   @todo
  */
-function config_get_verified_storage_names_with_prefix($prefix = '') {
-  return DrupalVerifiedStorageSQL::getNamesWithPrefix($prefix);
+function config_get_storage_names_with_prefix($prefix = '') {
+  return DatabaseStorage::getNamesWithPrefix($prefix);
 }
 
 /**
@@ -114,7 +114,7 @@ function config_get_verified_storage_names_with_prefix($prefix = '') {
  *   alternate storage engines..
  */
 function config($name, $class = 'Drupal\Core\Config\DrupalConfig') {
-  return new $class(new DrupalVerifiedStorageSQL($name));
+  return new $class(new DatabaseStorage($name));
 }
 
 /**
diff --git a/core/includes/update.inc b/core/includes/update.inc
index e5c62d83882bbf31dc117c9b827d8130a4f8e183..fb6f450894b4a43dbbe40f8e9725a15fdf69f2f8 100644
--- a/core/includes/update.inc
+++ b/core/includes/update.inc
@@ -321,9 +321,11 @@ function update_module_enable(array $modules) {
  * will be displayed at all.
  *
  * If it fails for whatever reason, it should throw an instance of
- * DrupalUpdateException with an appropriate error message, for example:
+ * Drupal\Core\Utility\UpdateException with an appropriate error message, for
+ * example:
  * @code
- * throw new DrupalUpdateException(t('Description of what went wrong'));
+ * use Drupal\Core\Utility\UpdateException;
+ * throw new UpdateException(t('Description of what went wrong'));
  * @endcode
  *
  * If an exception is thrown, the current update and all updates that depend on
@@ -403,11 +405,6 @@ function update_do_one($module, $number, $dependency_map, &$context) {
   $context['message'] = 'Updating ' . check_plain($module) . ' module';
 }
 
-/**
- * @class Exception class used to throw error if a module update fails.
- */
-class DrupalUpdateException extends Exception { }
-
 /**
  * Start the database update batch process.
  *
diff --git a/core/lib/Drupal/Core/Config/ConfigFileStorageReadException.php b/core/lib/Drupal/Core/Config/ConfigFileStorageReadException.php
deleted file mode 100644
index a3ac95c87c0a4780160ad1bb57d01565d4b7a968..0000000000000000000000000000000000000000
--- a/core/lib/Drupal/Core/Config/ConfigFileStorageReadException.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php
-
-namespace Drupal\Core\Config;
-
-use Drupal\Core\Config\ConfigFileStorageException;
-
-/**
- * @todo
- */
-class ConfigFileStorageReadException extends ConfigFileStorageException {}
diff --git a/core/lib/Drupal/Core/Config/DrupalVerifiedStorageSQL.php b/core/lib/Drupal/Core/Config/DatabaseStorage.php
similarity index 78%
rename from core/lib/Drupal/Core/Config/DrupalVerifiedStorageSQL.php
rename to core/lib/Drupal/Core/Config/DatabaseStorage.php
index 97d499a555f8a481be113b36593a243f96f83703..63ae7b47572dd0f7464c6d1fee931735bbc91db1 100644
--- a/core/lib/Drupal/Core/Config/DrupalVerifiedStorageSQL.php
+++ b/core/lib/Drupal/Core/Config/DatabaseStorage.php
@@ -2,16 +2,16 @@
 
 namespace Drupal\Core\Config;
 
-use Drupal\Core\Config\DrupalConfigVerifiedStorage;
+use Drupal\Core\Config\StorageBase;
 use Exception;
 
 /**
  * Represents an SQL-based configuration storage object.
  */
-class DrupalVerifiedStorageSQL extends DrupalConfigVerifiedStorage {
+class DatabaseStorage extends StorageBase {
 
   /**
-   * Overrides DrupalConfigVerifiedStorage::read().
+   * Overrides StorageBase::read().
    */
   public function read() {
     // There are situations, like in the installer, where we may attempt a
@@ -26,7 +26,7 @@ public function read() {
   }
 
   /**
-   * Implements DrupalConfigVerifiedStorageInterface::writeToActive().
+   * Implements StorageInterface::writeToActive().
    */
   public function writeToActive($data) {
     return db_merge('config')
@@ -45,7 +45,7 @@ public function deleteFromActive() {
   }
 
   /**
-   * Implements DrupalConfigVerifiedStorageInterface::getNamesWithPrefix().
+   * Implements StorageInterface::getNamesWithPrefix().
    */
   static public function getNamesWithPrefix($prefix = '') {
     return db_query('SELECT name FROM {config} WHERE name LIKE :name', array(':name' => db_like($prefix) . '%'))->fetchCol();
diff --git a/core/lib/Drupal/Core/Config/DrupalConfig.php b/core/lib/Drupal/Core/Config/DrupalConfig.php
index 9fc33aac20f9571c8c5b617e288425993ed2c557..c40575761680d58e1f5083caa3c844b92396cd20 100644
--- a/core/lib/Drupal/Core/Config/DrupalConfig.php
+++ b/core/lib/Drupal/Core/Config/DrupalConfig.php
@@ -2,7 +2,7 @@
 
 namespace Drupal\Core\Config;
 
-use Drupal\Core\Config\DrupalConfigVerifiedStorageInterface;
+use Drupal\Core\Config\StorageInterface;
 use Drupal\Core\Config\ConfigException;
 
 /**
@@ -13,22 +13,22 @@ class DrupalConfig {
   /**
    * The storage engine to save this config object to.
    *
-   * @var DrupalConfigVerifiedStorageInterface
+   * @var StorageInterface
    */
-  protected $_verifiedStorage;
+  protected $storage;
 
   protected $data = array();
 
   /**
    * Constructs a DrupalConfig object.
    *
-   * @param DrupalConfigVerifiedStorageInterface $verified_storage
+   * @param StorageInterface $storage
    *   The storage engine where this config object should be saved.
    *
    * @todo $this should really know about $name and make it publicly accessible.
    */
-  public function __construct(DrupalConfigVerifiedStorageInterface $verified_storage) {
-    $this->_verifiedStorage = $verified_storage;
+  public function __construct(StorageInterface $storage) {
+    $this->storage = $storage;
     $this->read();
   }
 
@@ -36,7 +36,7 @@ public function __construct(DrupalConfigVerifiedStorageInterface $verified_stora
    * Reads config data from the active store into our object.
    */
   public function read() {
-    $active = (array) config_decode($this->_verifiedStorage->read());
+    $active = (array) config_decode($this->storage->read());
     foreach ($active as $key => $value) {
       // If the setting is empty, return an empty string rather than an array.
       // This is necessary because SimpleXML's default behavior is to return
@@ -89,7 +89,7 @@ public function isOverridden($key) {
   public function get($key = '') {
     global $conf;
 
-    $name = $this->_verifiedStorage->getName();
+    $name = $this->storage->getName();
     if (isset($conf[$name])) {
       $merged_data = drupal_array_merge_deep($this->data, $conf[$name]);
     }
@@ -201,7 +201,7 @@ public function clear($key) {
    * Saves the configuration object to disk as XML.
    */
   public function save() {
-    $this->_verifiedStorage->write(config_encode($this->data));
+    $this->storage->write(config_encode($this->data));
   }
 
   /**
@@ -209,6 +209,6 @@ public function save() {
    */
   public function delete() {
     $this->data = array();
-    $this->_verifiedStorage->delete();
+    $this->storage->delete();
   }
 }
diff --git a/core/lib/Drupal/Core/Config/FileStorage.php b/core/lib/Drupal/Core/Config/FileStorage.php
index 77b8db535ffdd3b2b373245ce3a87d14c4288d36..e65e168aaf3ba1cceff8a2071db7ed0a8c62fee0 100644
--- a/core/lib/Drupal/Core/Config/FileStorage.php
+++ b/core/lib/Drupal/Core/Config/FileStorage.php
@@ -32,7 +32,7 @@ public function __construct($name) {
   protected function readData() {
     $data = file_get_contents($this->getFilePath());
     if ($data === FALSE) {
-      throw new \Exception('Read file is invalid.');
+      throw new FileStorageReadException('Read file is invalid.');
     }
     return $data;
   }
@@ -68,7 +68,7 @@ public function getFilePath() {
    */
   public function write($data) {
     if (!file_put_contents($this->getFilePath(), $data)) {
-      throw new \Exception('Failed to write configuration file: ' . $this->getFilePath());
+      throw new FileStorageException('Failed to write configuration file: ' . $this->getFilePath());
     }
   }
 
diff --git a/core/lib/Drupal/Core/Config/ConfigFileStorageException.php b/core/lib/Drupal/Core/Config/FileStorageException.php
similarity index 61%
rename from core/lib/Drupal/Core/Config/ConfigFileStorageException.php
rename to core/lib/Drupal/Core/Config/FileStorageException.php
index ce7fb305834eb06b87d613bd93b4e854f247921e..bf3ae5febe9c2fe406b55168a19012d59e0b3ac6 100644
--- a/core/lib/Drupal/Core/Config/ConfigFileStorageException.php
+++ b/core/lib/Drupal/Core/Config/FileStorageException.php
@@ -7,4 +7,4 @@
 /**
  * @todo
  */
-class ConfigFileStorageException extends ConfigException {}
+class FileStorageException extends ConfigException {}
diff --git a/core/lib/Drupal/Core/Config/FileStorageReadException.php b/core/lib/Drupal/Core/Config/FileStorageReadException.php
new file mode 100644
index 0000000000000000000000000000000000000000..d6136669cc2f0c51be7c93286fa1961cd5f30a5d
--- /dev/null
+++ b/core/lib/Drupal/Core/Config/FileStorageReadException.php
@@ -0,0 +1,10 @@
+<?php
+
+namespace Drupal\Core\Config;
+
+use Drupal\Core\Config\FileStorageException;
+
+/**
+ * @todo
+ */
+class FileStorageReadException extends FileStorageException {}
diff --git a/core/lib/Drupal/Core/Config/DrupalConfigVerifiedStorage.php b/core/lib/Drupal/Core/Config/StorageBase.php
similarity index 68%
rename from core/lib/Drupal/Core/Config/DrupalConfigVerifiedStorage.php
rename to core/lib/Drupal/Core/Config/StorageBase.php
index 56cd16d8842d54787fc93c1fa774dd0f2a6d71a0..7846aed3921e39d5c5d88ec72eb4d2c85af89d51 100644
--- a/core/lib/Drupal/Core/Config/DrupalConfigVerifiedStorage.php
+++ b/core/lib/Drupal/Core/Config/StorageBase.php
@@ -2,13 +2,13 @@
 
 namespace Drupal\Core\Config;
 
-use Drupal\Core\Config\DrupalConfigVerifiedStorageInterface;
+use Drupal\Core\Config\StorageInterface;
 use Drupal\Core\Config\FileStorage;
 
 /**
  * @todo
  */
-abstract class DrupalConfigVerifiedStorage implements DrupalConfigVerifiedStorageInterface {
+abstract class StorageBase implements StorageInterface {
 
   protected $name;
 
@@ -20,7 +20,7 @@ abstract class DrupalConfigVerifiedStorage implements DrupalConfigVerifiedStorag
   protected $fileStorage;
 
   /**
-   * Implements DrupalConfigVerifiedStorageInterface::__construct().
+   * Implements StorageInterface::__construct().
    */
   function __construct($name) {
     $this->name = $name;
@@ -40,21 +40,21 @@ protected function fileStorage() {
   }
 
   /**
-   * Implements DrupalConfigVerifiedStorageInterface::copyToFile().
+   * Implements StorageInterface::copyToFile().
    */
   public function copyToFile() {
     return $this->writeToFile($this->read());
   }
 
   /**
-   * Implements DrupalConfigVerifiedStorageInterface::deleteFile().
+   * Implements StorageInterface::deleteFile().
    */
   public function deleteFile() {
     return $this->fileStorage()->delete();
   }
 
   /**
-   * Implements DrupalConfigVerifiedStorageInterface::copyFromFile().
+   * Implements StorageInterface::copyFromFile().
    */
   public function copyFromFile() {
     return $this->writeToActive($this->readFromFile());
@@ -71,14 +71,14 @@ public function readFromFile() {
   }
 
   /**
-   * Implements DrupalConfigVerifiedStorageInterface::isOutOfSync().
+   * Implements StorageInterface::isOutOfSync().
    */
   public function isOutOfSync() {
     return $this->read() !== $this->readFromFile();
   }
 
   /**
-   * Implements DrupalConfigVerifiedStorageInterface::write().
+   * Implements StorageInterface::write().
    */
   public function write($data) {
     $this->writeToActive($data);
@@ -86,14 +86,14 @@ public function write($data) {
   }
 
   /**
-   * Implements DrupalConfigVerifiedStorageInterface::writeToFile().
+   * Implements StorageInterface::writeToFile().
    */
   public function writeToFile($data) {
     return $this->fileStorage()->write($data);
   }
 
   /**
-   * Implements DrupalConfigVerifiedStorageInterface::delete().
+   * Implements StorageInterface::delete().
    */
   public function delete() {
     $this->deleteFromActive();
@@ -101,7 +101,7 @@ public function delete() {
   }
 
   /**
-   * Implements DrupalConfigVerifiedStorageInterface::getName().
+   * Implements StorageInterface::getName().
    */
   public function getName() {
     return $this->name;
diff --git a/core/lib/Drupal/Core/Config/DrupalConfigVerifiedStorageInterface.php b/core/lib/Drupal/Core/Config/StorageInterface.php
similarity index 69%
rename from core/lib/Drupal/Core/Config/DrupalConfigVerifiedStorageInterface.php
rename to core/lib/Drupal/Core/Config/StorageInterface.php
index 8048e353e1b344d894dda9431f5f856285bd4b78..f1e8a3d3a8be9e319329e7fe839b7b29cdf9f586 100644
--- a/core/lib/Drupal/Core/Config/DrupalConfigVerifiedStorageInterface.php
+++ b/core/lib/Drupal/Core/Config/StorageInterface.php
@@ -3,15 +3,15 @@
 namespace Drupal\Core\Config;
 
 /**
- * Defines an interface for verified storage manipulation.
+ * Defines an interface for configuration storage manipulation.
  *
  * This class allows reading and writing configuration data from/to the
- * verified storage and copying to/from the file storing the same data.
+ * storage and copying to/from the file storing the same data.
  */
-interface DrupalConfigVerifiedStorageInterface {
+interface StorageInterface {
 
   /**
-   * Constructs a verified storage manipulation class.
+   * Constructs a storage manipulation class.
    *
    * @param $name
    *   Lowercase string, the name for the configuration data.
@@ -19,17 +19,17 @@ interface DrupalConfigVerifiedStorageInterface {
   function __construct($name);
 
   /**
-   * Reads the configuration data from the verified storage.
+   * Reads the configuration data from the storage.
    */
   function read();
 
   /**
-   * Copies the configuration data from the verified storage into a file.
+   * Copies the configuration data from the storage into a file.
    */
   function copyToFile();
 
   /**
-   * Copies the configuration data from the file into the verified storage.
+   * Copies the configuration data from the file into the storage.
    */
   function copyFromFile();
 
@@ -39,10 +39,10 @@ function copyFromFile();
   function deleteFile();
 
   /**
-   * Checks whether the file and the verified storage is in sync.
+   * Checks whether the file and the storage is in sync.
    *
    * @return
-   *   TRUE if the file and the verified storage contains the same data, FALSE
+   *   TRUE if the file and the storage contains the same data, FALSE
    *   if not.
    */
   function isOutOfSync();
diff --git a/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php
index 129ca42fec0c28c8d6cd96646f9ec35a261dd92c..a8bdaa917a543a2b50413a4cdf493f27b891f9d1 100644
--- a/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php
+++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php
@@ -157,18 +157,12 @@ public function databaseType() {
   }
 
   public function mapConditionOperator($operator) {
-    static $specials;
-
-    // Function calls not allowed in static declarations, thus this method.
-    if (!isset($specials)) {
-      $specials = array(
-        // In PostgreSQL, 'LIKE' is case-sensitive. For case-insensitive LIKE
-        // statements, we need to use ILIKE instead.
-        'LIKE' => array('operator' => 'ILIKE'),
-        'NOT LIKE' => array('operator' => 'NOT ILIKE'),
-      );
-    }
-
+    static $specials = array(
+      // In PostgreSQL, 'LIKE' is case-sensitive. For case-insensitive LIKE
+      // statements, we need to use ILIKE instead.
+      'LIKE' => array('operator' => 'ILIKE'),
+      'NOT LIKE' => array('operator' => 'NOT ILIKE'),
+    );
     return isset($specials[$operator]) ? $specials[$operator] : NULL;
   }
 
diff --git a/core/lib/Drupal/Core/Utility/UpdateException.php b/core/lib/Drupal/Core/Utility/UpdateException.php
new file mode 100644
index 0000000000000000000000000000000000000000..d86992cdbc09ab8aea588016a8a73540818b9cb2
--- /dev/null
+++ b/core/lib/Drupal/Core/Utility/UpdateException.php
@@ -0,0 +1,13 @@
+<?php
+
+/*
+ * @file
+ * Definition of Drupal\Core\Utility\UpdateException.
+ */
+
+namespace Drupal\Core\Utility;
+
+/**
+ * Exception class used to throw error if a module update fails.
+ */
+class UpdateException extends Exception { }
diff --git a/core/modules/aggregator/aggregator.test b/core/modules/aggregator/aggregator.test
index f58fb65fae905a7a1c372628a2cf60fadd9cb6d7..afba1818bdd3a67760e07a5ee9c7f1c4ddc3d722 100644
--- a/core/modules/aggregator/aggregator.test
+++ b/core/modules/aggregator/aggregator.test
@@ -5,7 +5,9 @@
  * Tests for aggregator.module.
  */
 
-class AggregatorTestCase extends DrupalWebTestCase {
+use Drupal\simpletest\WebTestBase;
+
+class AggregatorTestCase extends WebTestBase {
   function setUp() {
     parent::setUp(array('node', 'block', 'aggregator', 'aggregator_test'));
 
diff --git a/core/modules/block/block.test b/core/modules/block/block.test
index 192e264531b3da5e1066f6c5890c43ea0dea1f73..7782e77d5be258c1b8bde4d3975c68f72c4f049b 100644
--- a/core/modules/block/block.test
+++ b/core/modules/block/block.test
@@ -5,7 +5,10 @@
  * Tests for block.module.
  */
 
-class BlockTestCase extends DrupalWebTestCase {
+use Drupal\simpletest\WebTestBase;
+use Drupal\simpletest\UnitTestBase;
+
+class BlockTestCase extends WebTestBase {
   protected $regions;
   protected $admin_user;
 
@@ -398,7 +401,7 @@ class BlockTestCase extends DrupalWebTestCase {
   }
 }
 
-class NonDefaultBlockAdmin extends DrupalWebTestCase {
+class NonDefaultBlockAdmin extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Non default theme admin',
@@ -426,7 +429,7 @@ class NonDefaultBlockAdmin extends DrupalWebTestCase {
 /**
  * Test blocks correctly initialized when picking a new default theme.
  */
-class NewDefaultThemeBlocks extends DrupalWebTestCase {
+class NewDefaultThemeBlocks extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'New default theme blocks',
@@ -481,7 +484,7 @@ class NewDefaultThemeBlocks extends DrupalWebTestCase {
 /**
  * Test the block system with admin themes.
  */
-class BlockAdminThemeTestCase extends DrupalWebTestCase {
+class BlockAdminThemeTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Admin theme block admin accessibility',
@@ -517,7 +520,7 @@ class BlockAdminThemeTestCase extends DrupalWebTestCase {
 /**
  * Test block caching.
  */
-class BlockCacheTestCase extends DrupalWebTestCase {
+class BlockCacheTestCase extends WebTestBase {
   protected $admin_user;
   protected $normal_user;
   protected $normal_user_alt;
@@ -704,7 +707,7 @@ class BlockCacheTestCase extends DrupalWebTestCase {
 /**
  * Test block HTML id validity.
  */
-class BlockHTMLIdTestCase extends DrupalWebTestCase {
+class BlockHTMLIdTestCase extends WebTestBase {
 
   public static function getInfo() {
     return array(
@@ -743,7 +746,7 @@ class BlockHTMLIdTestCase extends DrupalWebTestCase {
 /**
  * Unit tests for template_preprocess_block().
  */
-class BlockTemplateSuggestionsUnitTest extends DrupalUnitTestCase {
+class BlockTemplateSuggestionsUnitTest extends UnitTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Block template suggestions',
@@ -788,7 +791,7 @@ class BlockTemplateSuggestionsUnitTest extends DrupalUnitTestCase {
 /**
  * Tests that hidden regions do not inherit blocks when a theme is enabled.
  */
-class BlockHiddenRegionTestCase extends DrupalWebTestCase {
+class BlockHiddenRegionTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Blocks not in hidden region',
@@ -848,7 +851,7 @@ class BlockHiddenRegionTestCase extends DrupalWebTestCase {
 /**
  * Functional tests for the language list configuration forms.
  */
-class BlockLanguageTestCase extends DrupalWebTestCase {
+class BlockLanguageTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Language block visibility',
@@ -1034,7 +1037,7 @@ class BlockLanguageTestCase extends DrupalWebTestCase {
 /**
  * Tests that a block assigned to an invalid region triggers the warning.
  */
-class BlockInvalidRegionTestCase extends DrupalWebTestCase {
+class BlockInvalidRegionTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Blocks in invalid regions',
diff --git a/core/modules/book/book.test b/core/modules/book/book.test
index f7d82807a9f0f2dd5f71301fb4b16e290cb2aae0..00995cbad56131ef9d54cac3821a8b7a391cc4bc 100644
--- a/core/modules/book/book.test
+++ b/core/modules/book/book.test
@@ -6,8 +6,9 @@
  */
 
 use Drupal\node\Node;
+use Drupal\simpletest\WebTestBase;
 
-class BookTestCase extends DrupalWebTestCase {
+class BookTestCase extends WebTestBase {
   protected $book;
   // $book_author is a user with permission to create and edit books.
   protected $book_author;
diff --git a/core/modules/color/color.test b/core/modules/color/color.test
index 616d19a76d506a104d2f9e2266d3a26acef4827f..8835e5b14ecfcff64210771f3743bec0cba795be 100644
--- a/core/modules/color/color.test
+++ b/core/modules/color/color.test
@@ -5,10 +5,12 @@
  * Tests for color module.
  */
 
+use Drupal\simpletest\WebTestBase;
+
 /**
  * Tests the Color module functionality.
  */
-class ColorTestCase extends DrupalWebTestCase {
+class ColorTestCase extends WebTestBase {
   protected $big_user;
   protected $themes;
   protected $colorTests;
diff --git a/core/modules/comment/comment.test b/core/modules/comment/comment.test
index 3f5b0409f58fa19a59fd8a7884dc0f25031c8759..2e0a2098a25e892d22562fb5a1e0723093940ff4 100644
--- a/core/modules/comment/comment.test
+++ b/core/modules/comment/comment.test
@@ -6,8 +6,9 @@
  */
 
 use Drupal\comment\Comment;
+use Drupal\simpletest\WebTestBase;
 
-class CommentHelperCase extends DrupalWebTestCase {
+class CommentHelperCase extends WebTestBase {
   protected $profile = 'standard';
 
   protected $admin_user;
@@ -818,7 +819,7 @@ class CommentInterfaceTest extends CommentHelperCase {
     user_role_change_permissions($rid, $perms);
 
     // Output verbose debugging information.
-    // @see DrupalTestCase::error()
+    // @see Drupal\simpletest\TestBase::error()
     $t_form = array(
       COMMENT_FORM_BELOW => 'below',
       COMMENT_FORM_SEPARATE_PAGE => 'separate page',
@@ -1515,7 +1516,7 @@ class CommentNodeAccessTest extends CommentHelperCase {
   }
 
   function setUp() {
-    DrupalWebTestCase::setUp('comment', 'search', 'node_access_test');
+    WebTestBase::setUp('comment', 'search', 'node_access_test');
     node_access_rebuild();
 
     // Create users and test node.
diff --git a/core/modules/config/config.test b/core/modules/config/config.test
index c111aba3310151ed4ddf2e9df0b8b7cab5401597..f69dde968b7b517899b92cd754a4f5f7de959b46 100644
--- a/core/modules/config/config.test
+++ b/core/modules/config/config.test
@@ -6,11 +6,12 @@
  */
 
 use Drupal\Core\Config\FileStorage;
+use Drupal\simpletest\WebTestBase;
 
 /**
  * Tests the secure file writer.
  */
-class ConfigFileSecurityTestCase extends DrupalWebTestCase {
+class ConfigFileSecurityTestCase extends WebTestBase {
   protected $filename = 'foo.bar';
 
   protected $testContent = 'Good morning, Denver!';
@@ -50,7 +51,7 @@ class ConfigFileSecurityTestCase extends DrupalWebTestCase {
 /**
  * Tests reading and writing file contents.
  */
-class ConfigFileContentTestCase extends DrupalWebTestCase {
+class ConfigFileContentTestCase extends WebTestBase {
   protected $fileExtension = 'xml';
 
   public static function getInfo() {
@@ -231,7 +232,7 @@ class ConfigFileContentTestCase extends DrupalWebTestCase {
   /**
    * Tests configuration overriding from settings.php.
    */
-class ConfOverrideTestCase extends DrupalWebTestCase {
+class ConfOverrideTestCase extends WebTestBase {
   protected $testContent = 'Good morning, Denver!';
 
   public static function getInfo() {
@@ -259,7 +260,7 @@ class ConfOverrideTestCase extends DrupalWebTestCase {
 /**
  * Tests function providing configuration upgrade from Drupal 7 to 8.
  */
-class ConfUpdate7to8TestCase extends DrupalWebTestCase {
+class ConfUpdate7to8TestCase extends WebTestBase {
   protected $testContent = 'Olá, Sao Paulo!';
 
   public static function getInfo() {
diff --git a/core/modules/contact/contact.test b/core/modules/contact/contact.test
index 490d8f8b380341327dbe721fd1164eb5d2d6cf03..c80f21dadb1da836bf43aae4d9babd006b33f5c9 100644
--- a/core/modules/contact/contact.test
+++ b/core/modules/contact/contact.test
@@ -4,10 +4,12 @@
  * Tests for the Contact module.
  */
 
+use Drupal\simpletest\WebTestBase;
+
 /**
  * Tests the site-wide contact form.
  */
-class ContactSitewideTestCase extends DrupalWebTestCase {
+class ContactSitewideTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Site-wide contact form',
@@ -298,7 +300,7 @@ class ContactSitewideTestCase extends DrupalWebTestCase {
 /**
  * Tests the personal contact form.
  */
-class ContactPersonalTestCase extends DrupalWebTestCase {
+class ContactPersonalTestCase extends WebTestBase {
   private $admin_user;
   private $web_user;
   private $contact_user;
diff --git a/core/modules/contextual/contextual.test b/core/modules/contextual/contextual.test
index 734f7cf3c3d97c54334a9ebf46f549a16576f738..8749f3a889cdd90b9b7b9dfd813968292165414e 100644
--- a/core/modules/contextual/contextual.test
+++ b/core/modules/contextual/contextual.test
@@ -5,10 +5,12 @@
  * Tests for contextual.module.
  */
 
+use Drupal\simpletest\WebTestBase;
+
 /**
  * Tests accessible links after inaccessible links on dynamic context.
  */
-class ContextualDynamicContextTestCase extends DrupalWebTestCase {
+class ContextualDynamicContextTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Contextual links on node lists',
diff --git a/core/modules/dashboard/dashboard.test b/core/modules/dashboard/dashboard.test
index ff37d5764249517566de71fc4794e72751e9f2df..2808dc489f881b79dd49b78eac812188152c82f1 100644
--- a/core/modules/dashboard/dashboard.test
+++ b/core/modules/dashboard/dashboard.test
@@ -5,10 +5,13 @@
  * Tests for dashboard.module.
  */
 
+
+use Drupal\simpletest\WebTestBase;
+
 /**
  * Tests the Dashboard module blocks.
  */
-class DashboardBlocksTestCase extends DrupalWebTestCase {
+class DashboardBlocksTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Dashboard blocks',
@@ -106,7 +109,7 @@ class DashboardBlocksTestCase extends DrupalWebTestCase {
   }
 }
 
-class DashboardBlockAvailabilityTestCase extends DrupalWebTestCase {
+class DashboardBlockAvailabilityTestCase extends WebTestBase {
   protected $profile = 'standard';
 
   public static function getInfo() {
diff --git a/core/modules/dblog/dblog.test b/core/modules/dblog/dblog.test
index 77765d70eaee76736edce712793fadf3b661ab67..92763c107ed51181b132378837b141a7cee2d09a 100644
--- a/core/modules/dblog/dblog.test
+++ b/core/modules/dblog/dblog.test
@@ -5,7 +5,10 @@
  * Tests for dblog.module.
  */
 
-class DBLogTestCase extends DrupalWebTestCase {
+
+use Drupal\simpletest\WebTestBase;
+
+class DBLogTestCase extends WebTestBase {
   protected $profile = 'standard';
 
   protected $big_user;
diff --git a/core/modules/entity/tests/entity.test b/core/modules/entity/tests/entity.test
index abc02ef27026ca2b254b0ddb7a1c7201944385fb..d920937b8b327a10c0c632bdcae30117991d8ed9 100644
--- a/core/modules/entity/tests/entity.test
+++ b/core/modules/entity/tests/entity.test
@@ -5,10 +5,12 @@
  * Entity CRUD API tests.
  */
 
+use Drupal\simpletest\WebTestBase;
+
 /**
  * Tests the basic Entity API.
  */
-class EntityAPITestCase extends DrupalWebTestCase {
+class EntityAPITestCase extends WebTestBase {
 
   public static function getInfo() {
     return array(
@@ -92,7 +94,7 @@ class EntityAPITestCase extends DrupalWebTestCase {
 /**
  * Tests entity translation.
  */
-class EntityTranslationTestCase extends DrupalWebTestCase {
+class EntityTranslationTestCase extends WebTestBase {
 
   public static function getInfo() {
     return array(
@@ -201,7 +203,7 @@ class EntityTranslationTestCase extends DrupalWebTestCase {
 /**
  * Tests Entity API base functionality.
  */
-class EntityAPIInfoTestCase extends DrupalWebTestCase  {
+class EntityAPIInfoTestCase extends WebTestBase  {
 
   public static function getInfo() {
     return array(
diff --git a/core/modules/entity/tests/entity_crud_hook_test.test b/core/modules/entity/tests/entity_crud_hook_test.test
index 33dbb2ecaa2824274f24278dd53299df2e65975e..dd4aa70a12f65f62c281b59f15dbc5c81ce88a8b 100644
--- a/core/modules/entity/tests/entity_crud_hook_test.test
+++ b/core/modules/entity/tests/entity_crud_hook_test.test
@@ -5,6 +5,8 @@
  * CRUD hook tests for the Entity CRUD API.
  */
 
+use Drupal\simpletest\WebTestBase;
+
 /**
  * Tests invocation of hooks when performing an action.
  *
@@ -17,7 +19,7 @@
  * As well as all type-specific hooks, like hook_node_insert(),
  * hook_comment_update(), etc.
  */
-class EntityCrudHookTestCase extends DrupalWebTestCase {
+class EntityCrudHookTestCase extends WebTestBase {
 
   protected $ids = array();
 
diff --git a/core/modules/entity/tests/entity_query.test b/core/modules/entity/tests/entity_query.test
index c7ac57501bc74f2e1a91fa61bbcf14a1363aa9a8..edcf95a9519937c6246975070ea150f2309d5307 100644
--- a/core/modules/entity/tests/entity_query.test
+++ b/core/modules/entity/tests/entity_query.test
@@ -5,10 +5,12 @@
  * Unit test file for the entity API.
  */
 
+use Drupal\simpletest\WebTestBase;
+
 /**
  * Tests EntityFieldQuery.
  */
-class EntityFieldQueryTestCase extends DrupalWebTestCase {
+class EntityFieldQueryTestCase extends WebTestBase {
 
 
   public static function getInfo() {
diff --git a/core/modules/field/modules/field_sql_storage/field_sql_storage.test b/core/modules/field/modules/field_sql_storage/field_sql_storage.test
index 20b5bdc52896c49279be653b8e1ba4fe1aa26ccd..2a9043490aa51c703404d56ca0150410df99406e 100644
--- a/core/modules/field/modules/field_sql_storage/field_sql_storage.test
+++ b/core/modules/field/modules/field_sql_storage/field_sql_storage.test
@@ -2,6 +2,7 @@
 
 use Drupal\Core\Database\Database;
 use Drupal\field\FieldException;
+use Drupal\simpletest\WebTestBase;
 
 /**
  * @file
@@ -14,7 +15,7 @@ use Drupal\field\FieldException;
 /**
  * Tests field storage.
  */
-class FieldSqlStorageTestCase extends DrupalWebTestCase {
+class FieldSqlStorageTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name'  => 'Field SQL Storage tests',
diff --git a/core/modules/field/modules/number/number.test b/core/modules/field/modules/number/number.test
index e394aea37e47c7c2cda4c6bb48de38ece52f04a3..ddf9f1f5709d75172440ee719b746e3fa9d77cfd 100644
--- a/core/modules/field/modules/number/number.test
+++ b/core/modules/field/modules/number/number.test
@@ -5,10 +5,12 @@
  * Tests for number.module.
  */
 
+use Drupal\simpletest\WebTestBase;
+
 /**
  * Tests for number field types.
  */
-class NumberFieldTestCase extends DrupalWebTestCase {
+class NumberFieldTestCase extends WebTestBase {
   protected $field;
   protected $instance;
   protected $web_user;
diff --git a/core/modules/field/modules/text/text.test b/core/modules/field/modules/text/text.test
index 77efce91a458a801b18813bf77b3a0267462480b..a41e8cdb383ecd3083105345c3fa53c4b4821337 100644
--- a/core/modules/field/modules/text/text.test
+++ b/core/modules/field/modules/text/text.test
@@ -6,8 +6,9 @@
  */
 
 use Drupal\field\FieldValidationException;
+use Drupal\simpletest\WebTestBase;
 
-class TextFieldTestCase extends DrupalWebTestCase {
+class TextFieldTestCase extends WebTestBase {
   protected $instance;
   protected $admin_user;
   protected $web_user;
@@ -239,7 +240,7 @@ class TextFieldTestCase extends DrupalWebTestCase {
   }
 }
 
-class TextSummaryTestCase extends DrupalWebTestCase {
+class TextSummaryTestCase extends WebTestBase {
   protected $profile = 'standard';
 
   public static function getInfo() {
@@ -409,7 +410,7 @@ class TextSummaryTestCase extends DrupalWebTestCase {
   }
 }
 
-class TextTranslationTestCase extends DrupalWebTestCase {
+class TextTranslationTestCase extends WebTestBase {
   protected $profile = 'standard';
 
   public static function getInfo() {
diff --git a/core/modules/field/tests/field.test b/core/modules/field/tests/field.test
index 4b59fc8ac1ef13ef7e39efcdddc76330137255f4..9a850d98a17680b715cd8656e2c671c187adeca1 100644
--- a/core/modules/field/tests/field.test
+++ b/core/modules/field/tests/field.test
@@ -7,11 +7,12 @@
 
 use Drupal\field\FieldException;
 use Drupal\field\FieldValidationException;
+use Drupal\simpletest\WebTestBase;
 
 /**
  * Parent class for Field API tests.
  */
-class FieldTestCase extends DrupalWebTestCase {
+class FieldTestCase extends WebTestBase {
   var $default_storage = 'field_sql_storage';
 
   /**
@@ -19,8 +20,9 @@ class FieldTestCase extends DrupalWebTestCase {
    */
   function setUp() {
     // Since this is a base class for many test cases, support the same
-    // flexibility that DrupalWebTestCase::setUp() has for the modules to be
-    // passed in as either an array or a variable number of string arguments.
+    // flexibility that Drupal\simpletest\WebTestBase::setUp() has for the
+    // modules to be passed in as either an array or a variable number of string
+    // arguments.
     $modules = func_get_args();
     if (isset($modules[0]) && is_array($modules[0])) {
       $modules = $modules[0];
@@ -77,8 +79,9 @@ class FieldTestCase extends DrupalWebTestCase {
 class FieldAttachTestCase extends FieldTestCase {
   function setUp() {
     // Since this is a base class for many test cases, support the same
-    // flexibility that DrupalWebTestCase::setUp() has for the modules to be
-    // passed in as either an array or a variable number of string arguments.
+    // flexibility that Drupal\simpletest\WebTestBase::setUp() has for the
+    // modules to be passed in as either an array or a variable number of string
+    // arguments.
     $modules = func_get_args();
     if (isset($modules[0]) && is_array($modules[0])) {
       $modules = $modules[0];
diff --git a/core/modules/field/theme/field-rtl.css b/core/modules/field/theme/field-rtl.css
index 5d35a86a11cb31e29629fed32e60b3799b7f6975..7aa7936a35d80c2b5c2b91fc94a7d23a05ba1b12 100644
--- a/core/modules/field/theme/field-rtl.css
+++ b/core/modules/field/theme/field-rtl.css
@@ -1,7 +1,3 @@
-
-form .field-multiple-table th.field-label {
-  padding-right: 0;
-}
 form .field-multiple-table td.field-multiple-drag {
   padding-left: 0;
 }
diff --git a/core/modules/field/theme/field.css b/core/modules/field/theme/field.css
index 9eba32f0b7f56b4bc3bbbb9f05c6bf89a74af45c..b46b41bc3b13bf3f4f6fc8e08da878f2d41fe853 100644
--- a/core/modules/field/theme/field.css
+++ b/core/modules/field/theme/field.css
@@ -12,9 +12,6 @@
 form .field-multiple-table {
   margin: 0;
 }
-form .field-multiple-table th.field-label {
-  padding-left: 0; /*LTR*/
-}
 form .field-multiple-table td.field-multiple-drag {
   width: 30px;
   padding-right: 0; /*LTR*/
diff --git a/core/modules/field_ui/field_ui.test b/core/modules/field_ui/field_ui.test
index 80edc3834417f30a0d01f7aa46ebc890590985e8..c33552c77af86084aedf1314be9bd6728e2042f9 100644
--- a/core/modules/field_ui/field_ui.test
+++ b/core/modules/field_ui/field_ui.test
@@ -6,16 +6,18 @@
  */
 
 use Drupal\node\Node;
+use Drupal\simpletest\WebTestBase;
 
 /**
  * Provides common functionality for the Field UI test classes.
  */
-class FieldUITestCase extends DrupalWebTestCase {
+class FieldUITestCase extends WebTestBase {
 
   function setUp() {
     // Since this is a base class for many test cases, support the same
-    // flexibility that DrupalWebTestCase::setUp() has for the modules to be
-    // passed in as either an array or a variable number of string arguments.
+    // flexibility that Drupal\simpletest\WebTestBase::setUp() has for the
+    // modules to be passed in as either an array or a variable number of string
+    // arguments.
     $modules = func_get_args();
     if (isset($modules[0]) && is_array($modules[0])) {
       $modules = $modules[0];
@@ -681,7 +683,7 @@ class FieldUIManageDisplayTestCase extends FieldUITestCase {
     $output = drupal_render($element);
     $this->verbose(t('Rendered node - view mode: @view_mode', array('@view_mode' => $view_mode)) . '<hr />'. $output);
 
-    // Assign content so that DrupalWebTestCase functions can be used.
+    // Assign content so that WebTestBase functions can be used.
     $this->drupalSetContent($output);
     $method = ($not_exists ? 'assertNoText' : 'assertText');
     $return = $this->{$method}((string) $text, $message);
@@ -696,7 +698,7 @@ class FieldUIManageDisplayTestCase extends FieldUITestCase {
 /**
  * Tests custom widget hooks and callbacks on the field administration pages.
  */
-class FieldUIAlterTestCase extends DrupalWebTestCase {
+class FieldUIAlterTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Widget customization',
diff --git a/core/modules/file/tests/file.test b/core/modules/file/tests/file.test
index 92b7ef37290c7bff403fd049f42ea2cd4a85087c..febd1da4d0acc5d9b9b99cb98cce85209c636172 100644
--- a/core/modules/file/tests/file.test
+++ b/core/modules/file/tests/file.test
@@ -5,18 +5,21 @@
  * Tests for file.module.
  */
 
+use Drupal\simpletest\WebTestBase;
+
 /**
  * Provides methods specifically for testing File module's field handling.
  */
-class FileFieldTestCase extends DrupalWebTestCase {
+class FileFieldTestCase extends WebTestBase {
   protected $profile = 'standard';
 
   protected $admin_user;
 
   function setUp() {
     // Since this is a base class for many test cases, support the same
-    // flexibility that DrupalWebTestCase::setUp() has for the modules to be
-    // passed in as either an array or a variable number of string arguments.
+    // flexibility that Drupal\simpletest\WebTestBase::setUp() has for the
+    // modules to be passed in as either an array or a variable number of string
+    // arguments.
     $modules = func_get_args();
     if (isset($modules[0]) && is_array($modules[0])) {
       $modules = $modules[0];
diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module
index 1e6c28c093662fded108bf5b44d92b4a6036ccf6..5d5589eb97bb7c1e999a2f87b86e35d954a818dc 100644
--- a/core/modules/filter/filter.module
+++ b/core/modules/filter/filter.module
@@ -1424,7 +1424,7 @@ function _filter_url($text, $filter) {
   $tasks['_filter_url_parse_full_links'] = $pattern;
 
   // Match e-mail addresses.
-  $url_pattern = "[A-Za-z0-9._-]+@(?:$domain)";
+  $url_pattern = "[A-Za-z0-9._-]{1,254}@(?:$domain)";
   $pattern = "`($url_pattern)`";
   $tasks['_filter_url_parse_email_links'] = $pattern;
 
diff --git a/core/modules/filter/filter.test b/core/modules/filter/filter.test
index a387f1fa38442cd03c3eb98b24e5f90a10290bda..923a047825a6cf9dc7a5828c603ba61db5d85f92 100644
--- a/core/modules/filter/filter.test
+++ b/core/modules/filter/filter.test
@@ -5,10 +5,13 @@
  * Tests for filter.module.
  */
 
+use Drupal\simpletest\WebTestBase;
+use Drupal\simpletest\UnitTestBase;
+
 /**
  * Tests for text format and filter CRUD operations.
  */
-class FilterCRUDTestCase extends DrupalWebTestCase {
+class FilterCRUDTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Filter CRUD operations',
@@ -160,7 +163,7 @@ class FilterCRUDTestCase extends DrupalWebTestCase {
   }
 }
 
-class FilterAdminTestCase extends DrupalWebTestCase {
+class FilterAdminTestCase extends WebTestBase {
   protected $profile = 'standard';
 
   public static function getInfo() {
@@ -415,7 +418,7 @@ class FilterAdminTestCase extends DrupalWebTestCase {
   }
 }
 
-class FilterFormatAccessTestCase extends DrupalWebTestCase {
+class FilterFormatAccessTestCase extends WebTestBase {
   protected $admin_user;
   protected $filter_admin_user;
   protected $web_user;
@@ -662,7 +665,7 @@ class FilterFormatAccessTestCase extends DrupalWebTestCase {
   }
 }
 
-class FilterDefaultFormatTestCase extends DrupalWebTestCase {
+class FilterDefaultFormatTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Default text format functionality',
@@ -722,7 +725,7 @@ class FilterDefaultFormatTestCase extends DrupalWebTestCase {
   }
 }
 
-class FilterNoFormatTestCase extends DrupalWebTestCase {
+class FilterNoFormatTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Unassigned text format functionality',
@@ -745,7 +748,7 @@ class FilterNoFormatTestCase extends DrupalWebTestCase {
 /**
  * Security tests for missing/vanished text formats or filters.
  */
-class FilterSecurityTestCase extends DrupalWebTestCase {
+class FilterSecurityTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Security',
@@ -809,7 +812,7 @@ class FilterSecurityTestCase extends DrupalWebTestCase {
 /**
  * Unit tests for core filters.
  */
-class FilterUnitTestCase extends DrupalUnitTestCase {
+class FilterUnitTestCase extends UnitTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Filter module filters',
@@ -1214,6 +1217,11 @@ class FilterUnitTestCase extends DrupalUnitTestCase {
     // - absolute, mail, partial
     // - characters/encoding, surrounding markup, security
 
+    // Create a e-mail that is too long.
+    $long_email = str_repeat('a', 254) . '@example.com';
+    $too_long_email = str_repeat('b', 255) . '@example.com';
+
+
     // Filter selection/pattern matching.
     $tests = array(
       // HTTP URLs.
@@ -1225,10 +1233,12 @@ http://example.com or www.example.com
       ),
       // MAILTO URLs.
       '
-person@example.com or mailto:person2@example.com
+person@example.com or mailto:person2@example.com or ' . $long_email . ' but not ' . $too_long_email . '
 ' => array(
         '<a href="mailto:person@example.com">person@example.com</a>' => TRUE,
         '<a href="mailto:person2@example.com">mailto:person2@example.com</a>' => TRUE,
+        '<a href="mailto:' . $long_email . '">' . $long_email . '</a>' => TRUE,
+        '<a href="mailto:' . $too_long_email . '">' . $too_long_email . '</a>' => FALSE,
       ),
       // URI parts and special characters.
       '
@@ -1795,7 +1805,7 @@ body {color:red}
 /**
  * Tests for filter hook invocation.
  */
-class FilterHooksTestCase extends DrupalWebTestCase {
+class FilterHooksTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Filter format hooks',
@@ -1857,7 +1867,7 @@ class FilterHooksTestCase extends DrupalWebTestCase {
 /**
  * Tests filter settings.
  */
-class FilterSettingsTestCase extends DrupalWebTestCase {
+class FilterSettingsTestCase extends WebTestBase {
   protected $profile = 'testing';
 
   public static function getInfo() {
diff --git a/core/modules/forum/forum.test b/core/modules/forum/forum.test
index 9d8a9f1fc8e40ae6129e353fe2c876aa9daec131..45610920b7605e8a4b8b4d1af41fb46e916027c0 100644
--- a/core/modules/forum/forum.test
+++ b/core/modules/forum/forum.test
@@ -6,8 +6,9 @@
  */
 
 use Drupal\node\Node;
+use Drupal\simpletest\WebTestBase;
 
-class ForumTestCase extends DrupalWebTestCase {
+class ForumTestCase extends WebTestBase {
   protected $admin_user;
   protected $edit_own_topics_user;
   protected $edit_any_topics_user;
@@ -594,7 +595,7 @@ class ForumTestCase extends DrupalWebTestCase {
 /**
  * Tests the forum index listing.
  */
-class ForumIndexTestCase extends DrupalWebTestCase {
+class ForumIndexTestCase extends WebTestBase {
 
   public static function getInfo() {
     return array(
diff --git a/core/modules/help/help.test b/core/modules/help/help.test
index 7bffe7092da3dabd96af7b711a7566c0684cc39d..26214314c658bb214f8944c06e0c644a664ba8f5 100644
--- a/core/modules/help/help.test
+++ b/core/modules/help/help.test
@@ -5,10 +5,12 @@
  * Tests for help.module.
  */
 
+use Drupal\simpletest\WebTestBase;
+
 /**
  * Tests help display and user access for all modules implementing help.
  */
-class HelpTestCase extends DrupalWebTestCase {
+class HelpTestCase extends WebTestBase {
   // Tests help implementations of many arbitrary core modules.
   protected $profile = 'standard';
 
@@ -108,7 +110,7 @@ class HelpTestCase extends DrupalWebTestCase {
 /**
  * Tests a module without help to verify it is not listed in the help page.
  */
-class NoHelpTestCase extends DrupalWebTestCase {
+class NoHelpTestCase extends WebTestBase {
   /**
    * The user who will be created.
    */
diff --git a/core/modules/image/image.module b/core/modules/image/image.module
index 8fd8ceeb69914f42be76e8624ec0d6a97fbb69f0..3edf83c389a3ee9066948feb2ba8c49f4df04360 100644
--- a/core/modules/image/image.module
+++ b/core/modules/image/image.module
@@ -516,7 +516,7 @@ function image_styles() {
       $styles = array();
 
       // Select the styles we have configured.
-      $configured_styles = config_get_verified_storage_names_with_prefix('image.style');
+      $configured_styles = config_get_storage_names_with_prefix('image.style');
       foreach ($configured_styles as $config_name) {
         // @todo Allow to retrieve the name without prefix only.
         $style = image_style_load(str_replace('image.style.', '', $config_name));
diff --git a/core/modules/image/image.test b/core/modules/image/image.test
index 84b12964d1f7d6abb2f5bfacc865c6288976c4db..0752c442581839167aa60be54b937a934a612658 100644
--- a/core/modules/image/image.test
+++ b/core/modules/image/image.test
@@ -5,6 +5,9 @@
  * Tests for image.module.
  */
 
+use Drupal\simpletest\WebTestBase;
+use Drupal\simpletest\UnitTestBase;
+
 /**
  * TODO: Test the following functions.
  *
@@ -28,7 +31,7 @@
 /**
  * This class provides methods specifically for testing Image's field handling.
  */
-class ImageFieldTestCase extends DrupalWebTestCase {
+class ImageFieldTestCase extends WebTestBase {
   protected $admin_user;
 
   function setUp() {
@@ -118,7 +121,7 @@ class ImageFieldTestCase extends DrupalWebTestCase {
 /**
  * Tests the functions for generating paths and URLs for image styles.
  */
-class ImageStylesPathAndUrlUnitTest extends DrupalWebTestCase {
+class ImageStylesPathAndUrlUnitTest extends WebTestBase {
   protected $style_name;
   protected $image_info;
   protected $image_filepath;
@@ -901,7 +904,7 @@ class ImageFieldValidateTestCase extends ImageFieldTestCase {
 /**
  * Tests that images have correct dimensions when styled.
  */
-class ImageDimensionsUnitTest extends DrupalWebTestCase {
+class ImageDimensionsUnitTest extends WebTestBase {
   protected $profile = 'testing';
 
   public static function getInfo() {
@@ -1124,7 +1127,7 @@ class ImageDimensionsUnitTest extends DrupalWebTestCase {
 /**
  * Tests image_dimensions_scale().
  */
-class ImageDimensionsScaleTestCase extends DrupalUnitTestCase {
+class ImageDimensionsScaleTestCase extends UnitTestBase {
   public static function getInfo() {
     return array(
       'name' => 'image_dimensions_scale()',
diff --git a/core/modules/language/language.test b/core/modules/language/language.test
index 380e64f8b380ae48b5b5fa48abc224e3fea3aea6..d633d82ce5f1a383eaa2ba3b303e4f54fab39c53 100644
--- a/core/modules/language/language.test
+++ b/core/modules/language/language.test
@@ -10,10 +10,12 @@ use Drupal\Core\DependencyInjection\ContainerBuilder;
  *  - comparison of $GLOBALS default language against dependency injection;
  */
 
+use Drupal\simpletest\WebTestBase;
+
 /**
  * Functional tests for the language list configuration forms.
  */
-class LanguageListTest extends DrupalWebTestCase {
+class LanguageListTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Language list configuration',
@@ -168,7 +170,7 @@ class LanguageListTest extends DrupalWebTestCase {
 /**
  * Test for dependency injected language object.
  */
-class LanguageDependencyInjectionTest extends DrupalWebTestCase {
+class LanguageDependencyInjectionTest extends WebTestBase {
   public static function getInfo() {
     return array(
         'name' => 'Language dependency injection',
diff --git a/core/modules/locale/locale.test b/core/modules/locale/locale.test
index be2b3191d657cccda0dbb3dc80b36a8f4da7faed..482ceee5c487e2571f04bbd5a4f98c556d9982e0 100644
--- a/core/modules/locale/locale.test
+++ b/core/modules/locale/locale.test
@@ -20,11 +20,13 @@
  *  - a functional test fot language types/negotiation info.
  */
 
+use Drupal\simpletest\WebTestBase;
+use Drupal\simpletest\UnitTestBase;
 
 /**
  * Functional tests for language configuration's effect on negotiation setup.
  */
-class LocaleConfigurationTest extends DrupalWebTestCase {
+class LocaleConfigurationTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Language negotiation autoconfiguration',
@@ -90,7 +92,7 @@ class LocaleConfigurationTest extends DrupalWebTestCase {
 /**
  * Functional tests for JavaScript parsing for translatable strings.
  */
-class LocaleJavascriptTranslationTest extends DrupalWebTestCase {
+class LocaleJavascriptTranslationTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Javascript translation',
@@ -179,7 +181,7 @@ class LocaleJavascriptTranslationTest extends DrupalWebTestCase {
 /**
  * Functional test for string translation and validation.
  */
-class LocaleTranslationFunctionalTest extends DrupalWebTestCase {
+class LocaleTranslationFunctionalTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'String translate, search and validate',
@@ -587,7 +589,7 @@ class LocaleTranslationFunctionalTest extends DrupalWebTestCase {
 /**
  * Tests plural format handling functionality.
  */
-class LocalePluralFormatTest extends DrupalWebTestCase {
+class LocalePluralFormatTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Plural handling',
@@ -900,7 +902,7 @@ EOF;
 /**
  * Functional tests for the import of translation files.
  */
-class LocaleImportFunctionalTest extends DrupalWebTestCase {
+class LocaleImportFunctionalTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Translation import',
@@ -1377,7 +1379,7 @@ EOF;
 /**
  * Functional tests for the export of translation files.
  */
-class LocaleExportFunctionalTest extends DrupalWebTestCase {
+class LocaleExportFunctionalTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Translation export',
@@ -1519,7 +1521,7 @@ EOF;
 /**
  * Tests for the st() function.
  */
-class LocaleInstallTest extends DrupalWebTestCase {
+class LocaleInstallTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'String translation using st()',
@@ -1548,7 +1550,7 @@ class LocaleInstallTest extends DrupalWebTestCase {
 /**
  * Locale uninstall with English UI functional test.
  */
-class LocaleUninstallFunctionalTest extends DrupalWebTestCase {
+class LocaleUninstallFunctionalTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Locale uninstall (EN)',
@@ -1694,7 +1696,7 @@ class LocaleUninstallFrenchFunctionalTest extends LocaleUninstallFunctionalTest
 /**
  * Functional tests for the language switching feature.
  */
-class LocaleLanguageSwitchingFunctionalTest extends DrupalWebTestCase {
+class LocaleLanguageSwitchingFunctionalTest extends WebTestBase {
 
   public static function getInfo() {
     return array(
@@ -1772,7 +1774,7 @@ class LocaleLanguageSwitchingFunctionalTest extends DrupalWebTestCase {
 /**
  * Test browser language detection.
  */
-class LocaleBrowserDetectionTest extends DrupalUnitTestCase {
+class LocaleBrowserDetectionTest extends UnitTestBase {
 
   public static function getInfo() {
     return array(
@@ -1893,7 +1895,7 @@ class LocaleBrowserDetectionTest extends DrupalUnitTestCase {
 /**
  * Functional tests for configuring a different path alias per language.
  */
-class LocalePathFunctionalTest extends DrupalWebTestCase {
+class LocalePathFunctionalTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Path language settings',
@@ -2032,7 +2034,7 @@ class LocalePathFunctionalTest extends DrupalWebTestCase {
 /**
  * Functional tests for multilingual support on nodes.
  */
-class LocaleContentFunctionalTest extends DrupalWebTestCase {
+class LocaleContentFunctionalTest extends WebTestBase {
   protected $profile = 'standard';
 
   public static function getInfo() {
@@ -2255,7 +2257,7 @@ class LocaleContentFunctionalTest extends DrupalWebTestCase {
  *        http://example.cn/admin/config
  *          UI language in Chinese
  */
-class LocaleUILanguageNegotiationTest extends DrupalWebTestCase {
+class LocaleUILanguageNegotiationTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'UI language negotiation',
@@ -2549,7 +2551,7 @@ class LocaleUILanguageNegotiationTest extends DrupalWebTestCase {
 /**
  * Test that URL rewriting works as expected.
  */
-class LocaleUrlRewritingTest extends DrupalWebTestCase {
+class LocaleUrlRewritingTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'URL rewriting',
@@ -2621,7 +2623,7 @@ class LocaleUrlRewritingTest extends DrupalWebTestCase {
 /**
  * Functional test for multilingual fields.
  */
-class LocaleMultilingualFieldsFunctionalTest extends DrupalWebTestCase {
+class LocaleMultilingualFieldsFunctionalTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Multilingual fields',
@@ -2748,7 +2750,7 @@ class LocaleMultilingualFieldsFunctionalTest extends DrupalWebTestCase {
 /**
  * Functional tests for comment language.
  */
-class LocaleCommentLanguageFunctionalTest extends DrupalWebTestCase {
+class LocaleCommentLanguageFunctionalTest extends WebTestBase {
   protected $profile = 'standard';
 
   public static function getInfo() {
@@ -2843,7 +2845,7 @@ class LocaleCommentLanguageFunctionalTest extends DrupalWebTestCase {
 /**
  * Functional tests for localizing date formats.
  */
-class LocaleDateFormatsFunctionalTest extends DrupalWebTestCase {
+class LocaleDateFormatsFunctionalTest extends WebTestBase {
 
   public static function getInfo() {
     return array(
@@ -2915,7 +2917,7 @@ class LocaleDateFormatsFunctionalTest extends DrupalWebTestCase {
 /**
  * Functional test for language types/negotiation info.
  */
-class LocaleLanguageNegotiationInfoFunctionalTest extends DrupalWebTestCase {
+class LocaleLanguageNegotiationInfoFunctionalTest extends WebTestBase {
 
   public static function getInfo() {
     return array(
diff --git a/core/modules/menu/menu.test b/core/modules/menu/menu.test
index e1f2aa9f45e8c0c85eb1d0ac0349b70236554fc4..14fe96bc463091e0d05260fb0125eddb8763c518 100644
--- a/core/modules/menu/menu.test
+++ b/core/modules/menu/menu.test
@@ -5,7 +5,9 @@
  * Tests for menu.module.
  */
 
-class MenuTestCase extends DrupalWebTestCase {
+use Drupal\simpletest\WebTestBase;
+
+class MenuTestCase extends WebTestBase {
   protected $profile = 'standard';
 
   protected $big_user;
@@ -583,7 +585,7 @@ class MenuTestCase extends DrupalWebTestCase {
 /**
  * Test menu settings for nodes.
  */
-class MenuNodeTestCase extends DrupalWebTestCase {
+class MenuNodeTestCase extends WebTestBase {
   protected $profile = 'standard';
 
   public static function getInfo() {
diff --git a/core/modules/node/node.test b/core/modules/node/node.test
index ab053d16bdf1843727e79332aaf2f9e3b35a3649..67bf54937fff7db0c09e513450428c37a65fa57a 100644
--- a/core/modules/node/node.test
+++ b/core/modules/node/node.test
@@ -1,13 +1,14 @@
 <?php
 
 use Drupal\Core\Database\Database;
+use Drupal\simpletest\WebTestBase;
 
 /**
  * @file
  * Tests for node.module.
  */
 
-class NodeWebTestCase extends DrupalWebTestCase {
+class NodeWebTestCase extends WebTestBase {
   function setUp() {
     $modules = func_get_args();
     if (isset($modules[0]) && is_array($modules[0])) {
@@ -230,6 +231,22 @@ class NodeRevisionsTestCase extends NodeWebTestCase {
                         array('%revision-date' => format_date($nodes[1]->revision_timestamp),
                               '@type' => 'Basic page', '%title' => $nodes[1]->title)), t('Revision deleted.'));
     $this->assertTrue(db_query('SELECT COUNT(vid) FROM {node_revision} WHERE nid = :nid and vid = :vid', array(':nid' => $node->nid, ':vid' => $nodes[1]->vid))->fetchField() == 0, t('Revision not found.'));
+
+    // Set the revision timestamp to an older date to make sure that the
+    // confirmation message correctly displays the stored revision date.
+    $old_revision_date = REQUEST_TIME - 86400;
+    db_update('node_revision')
+      ->condition('vid', $nodes[2]->vid)
+      ->fields(array(
+        'timestamp' => $old_revision_date,
+      ))
+      ->execute();
+    $this->drupalPost("node/$node->nid/revisions/{$nodes[2]->vid}/revert", array(), t('Revert'));
+    $this->assertRaw(t('@type %title has been reverted back to the revision from %revision-date.', array(
+      '@type' => 'Basic page',
+      '%title' => $nodes[2]->title,
+      '%revision-date' => format_date($old_revision_date),
+    )));
   }
 
   /**
@@ -1768,7 +1785,7 @@ class NodeTitleTestCase extends NodeWebTestCase {
 /**
  * Test the node_feed() functionality.
  */
-class NodeFeedTestCase extends DrupalWebTestCase {
+class NodeFeedTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Node feed',
@@ -1925,7 +1942,7 @@ class NodeBlockFunctionalTest extends NodeWebTestCase {
 /**
  * Test multistep node forms basic options.
  */
-class MultiStepNodeFormBasicOptionsTest extends DrupalWebTestCase {
+class MultiStepNodeFormBasicOptionsTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Multistep node form basic options',
@@ -2420,7 +2437,7 @@ class NodeRevisionPermissionsTestCase extends NodeWebTestCase {
 /**
  * Tests pagination with a node access module enabled.
  */
-class NodeAccessPagerTestCase extends DrupalWebTestCase {
+class NodeAccessPagerTestCase extends WebTestBase {
 
   public static function getInfo() {
     return array(
diff --git a/core/modules/openid/openid.test b/core/modules/openid/openid.test
index 1beea00aa21597c47f57769ad5ed63bfd539f139..34e056755db3ed42ce3dfb0e3e5d3e2114461031 100644
--- a/core/modules/openid/openid.test
+++ b/core/modules/openid/openid.test
@@ -5,10 +5,12 @@
  * Tests for openid.module.
  */
 
+use Drupal\simpletest\WebTestBase;
+
 /**
  * Base class for OpenID tests.
  */
-abstract class OpenIDWebTestCase extends DrupalWebTestCase {
+abstract class OpenIDWebTestCase extends WebTestBase {
   function setUp() {
     $modules = func_get_args();
     if (isset($modules[0]) && is_array($modules[0])) {
@@ -695,7 +697,7 @@ class OpenIDRegistrationTestCase extends OpenIDWebTestCase {
 /**
  * Test internal helper functions.
  */
-class OpenIDUnitTest extends DrupalWebTestCase {
+class OpenIDUnitTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'OpenID helper functions',
diff --git a/core/modules/path/path.test b/core/modules/path/path.test
index 7150e617f53a539bf505f69ca0dac6898b5b63b0..bf80b4dbd4d9957ebcb9a615a7b88a06d778d95b 100644
--- a/core/modules/path/path.test
+++ b/core/modules/path/path.test
@@ -5,10 +5,12 @@
  * Tests for the Path module.
  */
 
+use Drupal\simpletest\WebTestBase;
+
 /**
  * Provides a base class for testing the Path module.
  */
-class PathTestCase extends DrupalWebTestCase {
+class PathTestCase extends WebTestBase {
   function setUp() {
     $modules = func_get_args();
     if (isset($modules[0]) && is_array($modules[0])) {
diff --git a/core/modules/php/php.test b/core/modules/php/php.test
index f6009c7e1c8376e9596d2724d57633156ca9e3d7..7f86ecc1e6ca42a00c6416beb5aa905d7fa596af 100644
--- a/core/modules/php/php.test
+++ b/core/modules/php/php.test
@@ -5,10 +5,12 @@
  * Tests for php.module.
  */
 
+use Drupal\simpletest\WebTestBase;
+
 /**
  * Defines a base PHP test case class.
  */
-class PHPTestCase extends DrupalWebTestCase {
+class PHPTestCase extends WebTestBase {
   protected $php_code_format;
 
   function setUp() {
diff --git a/core/modules/poll/poll.test b/core/modules/poll/poll.test
index cba67bac62d34c07007fcaa1e5da510f5e1c4f1e..b43c4073fe696f031c8fce5272c96c15daa69ed5 100644
--- a/core/modules/poll/poll.test
+++ b/core/modules/poll/poll.test
@@ -5,7 +5,9 @@
  * Tests for poll.module.
  */
 
-class PollWebTestCase extends DrupalWebTestCase {
+use Drupal\simpletest\WebTestBase;
+
+class PollWebTestCase extends WebTestBase {
   function setUp() {
     $modules = func_get_args();
     if (isset($modules[0]) && is_array($modules[0])) {
@@ -93,7 +95,7 @@ class PollWebTestCase extends DrupalWebTestCase {
    * @return
    *   An indexed array containing:
    *   - The generated POST values, suitable for
-   *     DrupalWebTestCase::drupalPost().
+   *     Drupal\simpletest\WebTestBase::drupalPost().
    *   - The number of poll choices contained in 'edit', for potential re-usage
    *     in subsequent invocations of this function.
    */
@@ -434,7 +436,7 @@ class PollBlockTestCase extends PollWebTestCase {
 /**
  * Test adding new choices.
  */
-class PollJSAddChoice extends DrupalWebTestCase {
+class PollJSAddChoice extends WebTestBase {
 
   public static function getInfo() {
     return array(
diff --git a/core/modules/rdf/rdf.test b/core/modules/rdf/rdf.test
index c160ccb915880bfd0e72472b4b37d489c7d32a93..0c60f4188e9b3b33350d7042449b12ad153756ba 100644
--- a/core/modules/rdf/rdf.test
+++ b/core/modules/rdf/rdf.test
@@ -6,8 +6,9 @@
  */
 
 use Drupal\node\Node;
+use Drupal\simpletest\WebTestBase;
 
-class RdfMappingHookTestCase extends DrupalWebTestCase {
+class RdfMappingHookTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'RDF mapping hook',
@@ -43,7 +44,7 @@ class RdfMappingHookTestCase extends DrupalWebTestCase {
 /**
  * Test RDFa markup generation.
  */
-class RdfRdfaMarkupTestCase extends DrupalWebTestCase {
+class RdfRdfaMarkupTestCase extends WebTestBase {
   protected $profile = 'standard';
 
   public static function getInfo() {
@@ -212,7 +213,7 @@ class RdfRdfaMarkupTestCase extends DrupalWebTestCase {
   }
 }
 
-class RdfCrudTestCase extends DrupalWebTestCase {
+class RdfCrudTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'RDF mapping CRUD functions',
@@ -578,7 +579,7 @@ class RdfCommentAttributesTestCase extends CommentHelperCase {
   }
 }
 
-class RdfTrackerAttributesTestCase extends DrupalWebTestCase {
+class RdfTrackerAttributesTestCase extends WebTestBase {
   protected $profile = 'standard';
 
   public static function getInfo() {
@@ -695,7 +696,7 @@ class RdfTrackerAttributesTestCase extends DrupalWebTestCase {
 /**
  * Tests for RDF namespaces declaration with hook_rdf_namespaces().
  */
-class RdfGetRdfNamespacesTestCase extends DrupalWebTestCase {
+class RdfGetRdfNamespacesTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'RDF namespaces',
@@ -725,7 +726,7 @@ class RdfGetRdfNamespacesTestCase extends DrupalWebTestCase {
 /**
  * Tests for RDF namespaces XML serialization.
  */
-class DrupalGetRdfNamespacesTestCase extends DrupalWebTestCase {
+class DrupalGetRdfNamespacesTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'RDF namespaces serialization test',
diff --git a/core/modules/search/search.test b/core/modules/search/search.test
index 60854655c219a816e17bec2337b006aedba54fe3..619055c7d4f347adc9d1147dd1a401084ef10444 100644
--- a/core/modules/search/search.test
+++ b/core/modules/search/search.test
@@ -11,7 +11,10 @@ const SEARCH_TYPE = '_test_';
 const SEARCH_TYPE_2 = '_test2_';
 const SEARCH_TYPE_JPN = '_test3_';
 
-class SearchWebTestCase extends DrupalWebTestCase {
+use Drupal\simpletest\WebTestBase;
+use Drupal\simpletest\UnitTestBase;
+
+class SearchWebTestCase extends WebTestBase {
   function setUp() {
     $modules = func_get_args();
     if (isset($modules[0]) && is_array($modules[0])) {
@@ -971,7 +974,7 @@ class SearchCommentTestCase extends SearchWebTestCase {
  *
  * @see http://drupal.org/node/419388 (issue)
  */
-class SearchExpressionInsertExtractTestCase extends DrupalUnitTestCase {
+class SearchExpressionInsertExtractTestCase extends UnitTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Search expression insert/extract',
@@ -1589,7 +1592,7 @@ class SearchConfigSettingsForm extends SearchWebTestCase {
 /**
  * Tests the search_excerpt() function.
  */
-class SearchExcerptTestCase extends DrupalUnitTestCase {
+class SearchExcerptTestCase extends UnitTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Search excerpt extraction',
diff --git a/core/modules/shortcut/shortcut.test b/core/modules/shortcut/shortcut.test
index 550c10cdb5595c712dbcb825e5b70326575d297a..815b7326d535ff32b5e84afda39037b306bbd14d 100644
--- a/core/modules/shortcut/shortcut.test
+++ b/core/modules/shortcut/shortcut.test
@@ -5,10 +5,12 @@
  * Tests for shortcut.module.
  */
 
+use Drupal\simpletest\WebTestBase;
+
 /**
  * Defines base class for shortcut test cases.
  */
-class ShortcutTestCase extends DrupalWebTestCase {
+class ShortcutTestCase extends WebTestBase {
 
   /**
    * User with permission to administer shortcuts.
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
new file mode 100644
index 0000000000000000000000000000000000000000..552b4e35c4cb82c7b33af8ca0eaed2f34fd77cb9
--- /dev/null
+++ b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
@@ -0,0 +1,677 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\simpletest\TestBase.
+ */
+
+namespace Drupal\simpletest;
+
+use Drupal\Core\Database\Database;
+use Drupal\Core\Database\ConnectionNotDefinedException;
+use ReflectionMethod;
+use ReflectionObject;
+
+/**
+ * Base class for Drupal tests.
+ *
+ * Do not extend this class directly, use either Drupal\simpletest\WebTestBaseBase
+ * or Drupal\simpletest\UnitTestBaseBase.
+ */
+abstract class TestBase {
+  /**
+   * The test run ID.
+   *
+   * @var string
+   */
+  protected $testId;
+
+  /**
+   * The database prefix of this test run.
+   *
+   * @var string
+   */
+  protected $databasePrefix = NULL;
+
+  /**
+   * The original file directory, before it was changed for testing purposes.
+   *
+   * @var string
+   */
+  protected $originalFileDirectory = NULL;
+
+  /**
+   * Time limit for the test.
+   */
+  protected $timeLimit = 500;
+
+  /**
+   * Current results of this test case.
+   *
+   * @var Array
+   */
+  public $results = array(
+    '#pass' => 0,
+    '#fail' => 0,
+    '#exception' => 0,
+    '#debug' => 0,
+  );
+
+  /**
+   * Assertions thrown in that test case.
+   *
+   * @var Array
+   */
+  protected $assertions = array();
+
+  /**
+   * This class is skipped when looking for the source of an assertion.
+   *
+   * When displaying which function an assert comes from, it's not too useful
+   * to see "WebTestBase->drupalLogin()', we would like to see the test
+   * that called it. So we need to skip the classes defining these helper
+   * methods.
+   */
+  protected $skipClasses = array(__CLASS__ => TRUE);
+
+  /**
+   * Flag to indicate whether the test has been set up.
+   *
+   * The setUp() method isolates the test from the parent Drupal site by
+   * creating a random prefix for the database and setting up a clean file
+   * storage directory. The tearDown() method then cleans up this test
+   * environment. We must ensure that setUp() has been run. Otherwise,
+   * tearDown() will act on the parent Drupal site rather than the test
+   * environment, destroying live data.
+   */
+  protected $setup = FALSE;
+
+  /**
+   * Constructor for Test.
+   *
+   * @param $test_id
+   *   Tests with the same id are reported together.
+   */
+  public function __construct($test_id = NULL) {
+    $this->testId = $test_id;
+  }
+
+  /**
+   * Checks the matching requirements for Test.
+   *
+   * @return
+   *   Array of errors containing a list of unmet requirements.
+   */
+  protected function checkRequirements() {
+    return array();
+  }
+
+  /**
+   * Internal helper: stores the assert.
+   *
+   * @param $status
+   *   Can be 'pass', 'fail', 'exception'.
+   *   TRUE is a synonym for 'pass', FALSE for 'fail'.
+   * @param $message
+   *   The message string.
+   * @param $group
+   *   Which group this assert belongs to.
+   * @param $caller
+   *   By default, the assert comes from a function whose name starts with
+   *   'test'. Instead, you can specify where this assert originates from
+   *   by passing in an associative array as $caller. Key 'file' is
+   *   the name of the source file, 'line' is the line number and 'function'
+   *   is the caller function itself.
+   */
+  protected function assert($status, $message = '', $group = 'Other', array $caller = NULL) {
+    // Convert boolean status to string status.
+    if (is_bool($status)) {
+      $status = $status ? 'pass' : 'fail';
+    }
+
+    // Increment summary result counter.
+    $this->results['#' . $status]++;
+
+    // Get the function information about the call to the assertion method.
+    if (!$caller) {
+      $caller = $this->getAssertionCall();
+    }
+
+    // Creation assertion array that can be displayed while tests are running.
+    $this->assertions[] = $assertion = array(
+      'test_id' => $this->testId,
+      'test_class' => get_class($this),
+      'status' => $status,
+      'message' => $message,
+      'message_group' => $group,
+      'function' => $caller['function'],
+      'line' => $caller['line'],
+      'file' => $caller['file'],
+    );
+
+    // Store assertion for display after the test has completed.
+    try {
+      $connection = Database::getConnection('default', 'simpletest_original_default');
+    }
+    catch (ConnectionNotDefinedException $e) {
+      // If the test was not set up, the simpletest_original_default
+      // connection does not exist.
+      $connection = Database::getConnection('default', 'default');
+    }
+    $connection
+      ->insert('simpletest')
+      ->fields($assertion)
+      ->execute();
+
+    // We do not use a ternary operator here to allow a breakpoint on
+    // test failure.
+    if ($status == 'pass') {
+      return TRUE;
+    }
+    else {
+      return FALSE;
+    }
+  }
+
+  /**
+   * Store an assertion from outside the testing context.
+   *
+   * This is useful for inserting assertions that can only be recorded after
+   * the test case has been destroyed, such as PHP fatal errors. The caller
+   * information is not automatically gathered since the caller is most likely
+   * inserting the assertion on behalf of other code. In all other respects
+   * the method behaves just like Drupal\simpletest\TestBase::assert() in terms
+   * of storing the assertion.
+   *
+   * @return
+   *   Message ID of the stored assertion.
+   *
+   * @see Drupal\simpletest\TestBase::assert()
+   * @see Drupal\simpletest\TestBase::deleteAssert()
+   */
+  public static function insertAssert($test_id, $test_class, $status, $message = '', $group = 'Other', array $caller = array()) {
+    // Convert boolean status to string status.
+    if (is_bool($status)) {
+      $status = $status ? 'pass' : 'fail';
+    }
+
+    $caller += array(
+      'function' => t('Unknown'),
+      'line' => 0,
+      'file' => t('Unknown'),
+    );
+
+    $assertion = array(
+      'test_id' => $test_id,
+      'test_class' => $test_class,
+      'status' => $status,
+      'message' => $message,
+      'message_group' => $group,
+      'function' => $caller['function'],
+      'line' => $caller['line'],
+      'file' => $caller['file'],
+    );
+
+    return db_insert('simpletest')
+      ->fields($assertion)
+      ->execute();
+  }
+
+  /**
+   * Delete an assertion record by message ID.
+   *
+   * @param $message_id
+   *   Message ID of the assertion to delete.
+   * @return
+   *   TRUE if the assertion was deleted, FALSE otherwise.
+   *
+   * @see Drupal\simpletest\TestBase::insertAssert()
+   */
+  public static function deleteAssert($message_id) {
+    return (bool) db_delete('simpletest')
+      ->condition('message_id', $message_id)
+      ->execute();
+  }
+
+  /**
+   * Cycles through backtrace until the first non-assertion method is found.
+   *
+   * @return
+   *   Array representing the true caller.
+   */
+  protected function getAssertionCall() {
+    $backtrace = debug_backtrace();
+
+    // The first element is the call. The second element is the caller.
+    // We skip calls that occurred in one of the methods of our base classes
+    // or in an assertion function.
+   while (($caller = $backtrace[1]) &&
+         ((isset($caller['class']) && isset($this->skipClasses[$caller['class']])) ||
+           substr($caller['function'], 0, 6) == 'assert')) {
+      // We remove that call.
+      array_shift($backtrace);
+    }
+
+    return _drupal_get_last_caller($backtrace);
+  }
+
+  /**
+   * Check to see if a value is not false (not an empty string, 0, NULL, or FALSE).
+   *
+   * @param $value
+   *   The value on which the assertion is to be done.
+   * @param $message
+   *   The message to display along with the assertion.
+   * @param $group
+   *   The type of assertion - examples are "Browser", "PHP".
+   * @return
+   *   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);
+  }
+
+  /**
+   * Check to see if a value is false (an empty string, 0, NULL, or FALSE).
+   *
+   * @param $value
+   *   The value on which the assertion is to be done.
+   * @param $message
+   *   The message to display along with the assertion.
+   * @param $group
+   *   The type of assertion - examples are "Browser", "PHP".
+   * @return
+   *   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);
+  }
+
+  /**
+   * Check to see if a value is NULL.
+   *
+   * @param $value
+   *   The value on which the assertion is to be done.
+   * @param $message
+   *   The message to display along with the assertion.
+   * @param $group
+   *   The type of assertion - examples are "Browser", "PHP".
+   * @return
+   *   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);
+  }
+
+  /**
+   * Check to see if a value is not NULL.
+   *
+   * @param $value
+   *   The value on which the assertion is to be done.
+   * @param $message
+   *   The message to display along with the assertion.
+   * @param $group
+   *   The type of assertion - examples are "Browser", "PHP".
+   * @return
+   *   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);
+  }
+
+  /**
+   * Check to see if two values are equal.
+   *
+   * @param $first
+   *   The first value to check.
+   * @param $second
+   *   The second value to check.
+   * @param $message
+   *   The message to display along with the assertion.
+   * @param $group
+   *   The type of assertion - examples are "Browser", "PHP".
+   * @return
+   *   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);
+  }
+
+  /**
+   * Check to see if two values are not equal.
+   *
+   * @param $first
+   *   The first value to check.
+   * @param $second
+   *   The second value to check.
+   * @param $message
+   *   The message to display along with the assertion.
+   * @param $group
+   *   The type of assertion - examples are "Browser", "PHP".
+   * @return
+   *   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);
+  }
+
+  /**
+   * Check to see if two values are identical.
+   *
+   * @param $first
+   *   The first value to check.
+   * @param $second
+   *   The second value to check.
+   * @param $message
+   *   The message to display along with the assertion.
+   * @param $group
+   *   The type of assertion - examples are "Browser", "PHP".
+   * @return
+   *   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);
+  }
+
+  /**
+   * Check to see if two values are not identical.
+   *
+   * @param $first
+   *   The first value to check.
+   * @param $second
+   *   The second value to check.
+   * @param $message
+   *   The message to display along with the assertion.
+   * @param $group
+   *   The type of assertion - examples are "Browser", "PHP".
+   * @return
+   *   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);
+  }
+
+  /**
+   * Fire an assertion that is always positive.
+   *
+   * @param $message
+   *   The message to display along with the assertion.
+   * @param $group
+   *   The type of assertion - examples are "Browser", "PHP".
+   * @return
+   *   TRUE.
+   */
+  protected function pass($message = NULL, $group = 'Other') {
+    return $this->assert(TRUE, $message, $group);
+  }
+
+  /**
+   * Fire an assertion that is always negative.
+   *
+   * @param $message
+   *   The message to display along with the assertion.
+   * @param $group
+   *   The type of assertion - examples are "Browser", "PHP".
+   * @return
+   *   FALSE.
+   */
+  protected function fail($message = NULL, $group = 'Other') {
+    return $this->assert(FALSE, $message, $group);
+  }
+
+  /**
+   * Fire an error assertion.
+   *
+   * @param $message
+   *   The message to display along with the assertion.
+   * @param $group
+   *   The type of assertion - examples are "Browser", "PHP".
+   * @param $caller
+   *   The caller of the error.
+   * @return
+   *   FALSE.
+   */
+  protected function error($message = '', $group = 'Other', array $caller = NULL) {
+    if ($group == 'User notice') {
+      // Since 'User notice' is set by trigger_error() which is used for debug
+      // set the message to a status of 'debug'.
+      return $this->assert('debug', $message, 'Debug', $caller);
+    }
+
+    return $this->assert('exception', $message, $group, $caller);
+  }
+
+  /**
+   * Logs verbose message in a text file.
+   *
+   * The a link to the vebose message will be placed in the test results via
+   * as a passing assertion with the text '[verbose message]'.
+   *
+   * @param $message
+   *   The verbose message to be stored.
+   *
+   * @see simpletest_verbose()
+   */
+  protected function verbose($message) {
+    if ($id = simpletest_verbose($message)) {
+      $url = file_create_url($this->originalFileDirectory . '/simpletest/verbose/' . get_class($this) . '-' . $id . '.html');
+      $this->error(l(t('Verbose message'), $url, array('attributes' => array('target' => '_blank'))), 'User notice');
+    }
+  }
+
+  /**
+   * Run all tests in this class.
+   *
+   * Regardless of whether $methods are passed or not, only method names
+   * starting with "test" are executed.
+   *
+   * @param $methods
+   *   (optional) A list of method names in the test case class to run; e.g.,
+   *   array('testFoo', 'testBar'). By default, all methods of the class are
+   *   taken into account, but it can be useful to only run a few selected test
+   *   methods during debugging.
+   */
+  public function run(array $methods = array()) {
+    // Initialize verbose debugging.
+    simpletest_verbose(NULL, variable_get('file_public_path', conf_path() . '/files'), get_class($this));
+
+    // HTTP auth settings (<username>:<password>) for the simpletest browser
+    // when sending requests to the test site.
+    $this->httpauth_method = variable_get('simpletest_httpauth_method', CURLAUTH_BASIC);
+    $username = variable_get('simpletest_httpauth_username', NULL);
+    $password = variable_get('simpletest_httpauth_password', NULL);
+    if ($username && $password) {
+      $this->httpauth_credentials = $username . ':' . $password;
+    }
+
+    set_error_handler(array($this, 'errorHandler'));
+    $class = get_class($this);
+    // Iterate through all the methods in this class, unless a specific list of
+    // methods to run was passed.
+    $class_methods = get_class_methods($class);
+    if ($methods) {
+      $class_methods = array_intersect($class_methods, $methods);
+    }
+    $missing_requirements = $this->checkRequirements();
+    if (!empty($missing_requirements)) {
+      $missing_requirements_object = new ReflectionObject($this);
+      $caller = array(
+        'file' => $missing_requirements_object->getFileName(),
+      );
+      foreach ($missing_requirements as $missing_requirement) {
+        TestBase::insertAssert($this->testId, $class, FALSE, $missing_requirement, 'Requirements check.', $caller);
+      }
+    }
+    else {
+      foreach ($class_methods as $method) {
+        // If the current method starts with "test", run it - it's a test.
+        if (strtolower(substr($method, 0, 4)) == 'test') {
+          // Insert a fail record. This will be deleted on completion to ensure
+          // that testing completed.
+          $method_info = new ReflectionMethod($class, $method);
+          $caller = array(
+            'file' => $method_info->getFileName(),
+            '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);
+          $this->setUp();
+          if ($this->setup) {
+            try {
+              $this->$method();
+              // Finish up.
+            }
+            catch (Exception $e) {
+              $this->exceptionHandler($e);
+            }
+            $this->tearDown();
+          }
+          else {
+            $this->fail(t("The test cannot be executed because it has not been set up properly."));
+          }
+          // Remove the completion check record.
+          TestBase::deleteAssert($completion_check_id);
+        }
+      }
+    }
+    // Clear out the error messages and restore error handler.
+    drupal_get_messages();
+    restore_error_handler();
+  }
+
+  /**
+   * Handle errors during test runs.
+   *
+   * Because this is registered in set_error_handler(), it has to be public.
+   * @see set_error_handler
+   */
+  public function errorHandler($severity, $message, $file = NULL, $line = NULL) {
+    if ($severity & error_reporting()) {
+      $error_map = array(
+        E_STRICT => 'Run-time notice',
+        E_WARNING => 'Warning',
+        E_NOTICE => 'Notice',
+        E_CORE_ERROR => 'Core error',
+        E_CORE_WARNING => 'Core warning',
+        E_USER_ERROR => 'User error',
+        E_USER_WARNING => 'User warning',
+        E_USER_NOTICE => 'User notice',
+        E_RECOVERABLE_ERROR => 'Recoverable error',
+      );
+
+      $backtrace = debug_backtrace();
+      $this->error($message, $error_map[$severity], _drupal_get_last_caller($backtrace));
+    }
+    return TRUE;
+  }
+
+  /**
+   * Handle exceptions.
+   *
+   * @see set_exception_handler
+   */
+  protected function exceptionHandler($exception) {
+    $backtrace = $exception->getTrace();
+    // Push on top of the backtrace the call that generated the exception.
+    array_unshift($backtrace, array(
+      'line' => $exception->getLine(),
+      'file' => $exception->getFile(),
+    ));
+    require_once DRUPAL_ROOT . '/core/includes/errors.inc';
+    // The exception message is run through check_plain() by _drupal_decode_exception().
+    $this->error(t('%type: !message in %function (line %line of %file).', _drupal_decode_exception($exception)), 'Uncaught exception', _drupal_get_last_caller($backtrace));
+  }
+
+  /**
+   * Generates a random string of ASCII characters of codes 32 to 126.
+   *
+   * The generated string includes alpha-numeric characters and common misc
+   * characters. Use this method when testing general input where the content
+   * is not restricted.
+   *
+   * @param $length
+   *   Length of random string to generate.
+   * @return
+   *   Randomly generated string.
+   */
+  public static function randomString($length = 8) {
+    $str = '';
+    for ($i = 0; $i < $length; $i++) {
+      $str .= chr(mt_rand(32, 126));
+    }
+    return $str;
+  }
+
+  /**
+   * Generates a random string containing letters and numbers.
+   *
+   * The string will always start with a letter. The letters may be upper or
+   * lower case. This method is better for restricted inputs that do not
+   * accept certain characters. For example, when testing input fields that
+   * require machine readable values (i.e. without spaces and non-standard
+   * characters) this method is best.
+   *
+   * @param $length
+   *   Length of random string to generate.
+   * @return
+   *   Randomly generated string.
+   */
+  public static function randomName($length = 8) {
+    $values = array_merge(range(65, 90), range(97, 122), range(48, 57));
+    $max = count($values) - 1;
+    $str = chr(mt_rand(97, 122));
+    for ($i = 1; $i < $length; $i++) {
+      $str .= chr($values[mt_rand(0, $max)]);
+    }
+    return $str;
+  }
+
+  /**
+   * Converts a list of possible parameters into a stack of permutations.
+   *
+   * Takes a list of parameters containing possible values, and converts all of
+   * them into a list of items containing every possible permutation.
+   *
+   * Example:
+   * @code
+   * $parameters = array(
+   *   'one' => array(0, 1),
+   *   'two' => array(2, 3),
+   * );
+   * $permutations = $this->permute($parameters);
+   * // Result:
+   * $permutations == array(
+   *   array('one' => 0, 'two' => 2),
+   *   array('one' => 1, 'two' => 2),
+   *   array('one' => 0, 'two' => 3),
+   *   array('one' => 1, 'two' => 3),
+   * )
+   * @endcode
+   *
+   * @param $parameters
+   *   An associative array of parameters, keyed by parameter name, and whose
+   *   values are arrays of parameter values.
+   *
+   * @return
+   *   A list of permutations, which is an array of arrays. Each inner array
+   *   contains the full list of parameters that have been passed, but with a
+   *   single value only.
+   */
+  public static function generatePermutations($parameters) {
+    $all_permutations = array(array());
+    foreach ($parameters as $parameter => $values) {
+      $new_permutations = array();
+      // Iterate over all values of the parameter.
+      foreach ($values as $value) {
+        // Iterate over all existing permutations.
+        foreach ($all_permutations as $permutation) {
+          // Add the new parameter value to existing permutations.
+          $new_permutations[] = $permutation + array($parameter => $value);
+        }
+      }
+      // Replace the old permutations with the new permutations.
+      $all_permutations = $new_permutations;
+    }
+    return $all_permutations;
+  }
+}
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/UnitTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/UnitTestBase.php
new file mode 100644
index 0000000000000000000000000000000000000000..5b5850be2282c3324f80a053f2d5722877db802e
--- /dev/null
+++ b/core/modules/simpletest/lib/Drupal/simpletest/UnitTestBase.php
@@ -0,0 +1,92 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\simpletest\UnitTestBase.
+ */
+
+namespace Drupal\simpletest;
+
+use Drupal\Core\Database\Database;
+use Drupal\Core\Database\ConnectionNotDefinedException;
+
+/**
+ * Test case for Drupal unit tests.
+ *
+ * These tests can not access the database nor files. Calling any Drupal
+ * function that needs the database will throw exceptions. These include
+ * watchdog(), module_implements(), module_invoke_all() etc.
+ */
+abstract class UnitTestBase extends TestBase {
+
+  /**
+   * Constructor for UnitTestBase.
+   */
+  function __construct($test_id = NULL) {
+    parent::__construct($test_id);
+    $this->skipClasses[__CLASS__] = TRUE;
+  }
+
+  /**
+   * Sets up unit test environment.
+   *
+   * Unlike Drupal\simpletest\WebTestBase::setUp(), UnitTestBase::setUp() does not
+   * install modules because tests are performed without accessing the database.
+   * Any required files must be explicitly included by the child class setUp()
+   * method.
+   */
+  protected function setUp() {
+    global $conf;
+
+    // Store necessary current values before switching to the test environment.
+    $this->originalFileDirectory = variable_get('file_public_path', conf_path() . '/files');
+
+    // Reset all statics so that test is performed with a clean environment.
+    drupal_static_reset();
+
+    // Generate temporary prefixed database to ensure that tests have a clean starting point.
+    $this->databasePrefix = Database::getConnection()->prefixTables('{simpletest' . mt_rand(1000, 1000000) . '}');
+
+    // Create test directory.
+    $public_files_directory = $this->originalFileDirectory . '/simpletest/' . substr($this->databasePrefix, 10);
+    file_prepare_directory($public_files_directory, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS);
+    $conf['file_public_path'] = $public_files_directory;
+
+    // Clone the current connection and replace the current prefix.
+    $connection_info = Database::getConnectionInfo('default');
+    Database::renameConnection('default', 'simpletest_original_default');
+    foreach ($connection_info as $target => $value) {
+      $connection_info[$target]['prefix'] = array(
+        'default' => $value['prefix']['default'] . $this->databasePrefix,
+      );
+    }
+    Database::addConnectionInfo('default', 'default', $connection_info['default']);
+
+    // Set user agent to be consistent with web test case.
+    $_SERVER['HTTP_USER_AGENT'] = $this->databasePrefix;
+
+    // If locale is enabled then t() will try to access the database and
+    // subsequently will fail as the database is not accessible.
+    $module_list = module_list();
+    if (isset($module_list['locale'])) {
+      $this->originalModuleList = $module_list;
+      unset($module_list['locale']);
+      module_list(TRUE, FALSE, FALSE, $module_list);
+    }
+    $this->setup = TRUE;
+  }
+
+  protected function tearDown() {
+    global $conf;
+
+    // Get back to the original connection.
+    Database::removeConnection('default');
+    Database::renameConnection('simpletest_original_default', 'default');
+
+    $conf['file_public_path'] = $this->originalFileDirectory;
+    // Restore modules if necessary.
+    if (isset($this->originalModuleList)) {
+      module_list(TRUE, FALSE, FALSE, $this->originalModuleList);
+    }
+  }
+}
diff --git a/core/modules/simpletest/drupal_web_test_case.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
similarity index 77%
rename from core/modules/simpletest/drupal_web_test_case.php
rename to core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
index 8e59c5424f47f561bfbe355328e85b537971e3fa..fbac48c809e098e46615740cbdb5a8821bb0f2a5 100644
--- a/core/modules/simpletest/drupal_web_test_case.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
@@ -1,768 +1,25 @@
 <?php
 
-use Drupal\Core\Database\Database;
-use Drupal\Core\Database\ConnectionNotDefinedException;
-
-/**
- * Global variable that holds information about the tests being run.
- *
- * An array, with the following keys:
- *  - 'test_run_id': the ID of the test being run, in the form 'simpletest_%"
- *  - 'in_child_site': TRUE if the current request is a cURL request from
- *     the parent site.
- *
- * @var array
- */
-global $drupal_test_info;
-
 /**
- * Base class for Drupal tests.
- *
- * Do not extend this class, use one of the subclasses in this file.
+ * @file
+ * Definition of Drupal\simpletest\WebTestBase.
  */
-abstract class DrupalTestCase {
-  /**
-   * The test run ID.
-   *
-   * @var string
-   */
-  protected $testId;
-
-  /**
-   * The database prefix of this test run.
-   *
-   * @var string
-   */
-  protected $databasePrefix = NULL;
 
-  /**
-   * The original file directory, before it was changed for testing purposes.
-   *
-   * @var string
-   */
-  protected $originalFileDirectory = NULL;
-
-  /**
-   * Time limit for the test.
-   */
-  protected $timeLimit = 500;
+namespace Drupal\simpletest;
 
-  /**
-   * Current results of this test case.
-   *
-   * @var Array
-   */
-  public $results = array(
-    '#pass' => 0,
-    '#fail' => 0,
-    '#exception' => 0,
-    '#debug' => 0,
-  );
-
-  /**
-   * Assertions thrown in that test case.
-   *
-   * @var Array
-   */
-  protected $assertions = array();
-
-  /**
-   * This class is skipped when looking for the source of an assertion.
-   *
-   * When displaying which function an assert comes from, it's not too useful
-   * to see "drupalWebTestCase->drupalLogin()', we would like to see the test
-   * that called it. So we need to skip the classes defining these helper
-   * methods.
-   */
-  protected $skipClasses = array(__CLASS__ => TRUE);
-
-  /**
-   * Flag to indicate whether the test has been set up.
-   *
-   * The setUp() method isolates the test from the parent Drupal site by
-   * creating a random prefix for the database and setting up a clean file
-   * storage directory. The tearDown() method then cleans up this test
-   * environment. We must ensure that setUp() has been run. Otherwise,
-   * tearDown() will act on the parent Drupal site rather than the test
-   * environment, destroying live data.
-   */
-  protected $setup = FALSE;
-
-  /**
-   * Constructor for DrupalTestCase.
-   *
-   * @param $test_id
-   *   Tests with the same id are reported together.
-   */
-  public function __construct($test_id = NULL) {
-    $this->testId = $test_id;
-  }
-
-  /**
-   * Checks the matching requirements for DrupalTestCase.
-   *
-   * @return
-   *   Array of errors containing a list of unmet requirements.
-   */
-  protected function checkRequirements() {
-    return array();
-  }
-
-  /**
-   * Internal helper: stores the assert.
-   *
-   * @param $status
-   *   Can be 'pass', 'fail', 'exception'.
-   *   TRUE is a synonym for 'pass', FALSE for 'fail'.
-   * @param $message
-   *   The message string.
-   * @param $group
-   *   Which group this assert belongs to.
-   * @param $caller
-   *   By default, the assert comes from a function whose name starts with
-   *   'test'. Instead, you can specify where this assert originates from
-   *   by passing in an associative array as $caller. Key 'file' is
-   *   the name of the source file, 'line' is the line number and 'function'
-   *   is the caller function itself.
-   */
-  protected function assert($status, $message = '', $group = 'Other', array $caller = NULL) {
-    // Convert boolean status to string status.
-    if (is_bool($status)) {
-      $status = $status ? 'pass' : 'fail';
-    }
-
-    // Increment summary result counter.
-    $this->results['#' . $status]++;
-
-    // Get the function information about the call to the assertion method.
-    if (!$caller) {
-      $caller = $this->getAssertionCall();
-    }
-
-    // Creation assertion array that can be displayed while tests are running.
-    $this->assertions[] = $assertion = array(
-      'test_id' => $this->testId,
-      'test_class' => get_class($this),
-      'status' => $status,
-      'message' => $message,
-      'message_group' => $group,
-      'function' => $caller['function'],
-      'line' => $caller['line'],
-      'file' => $caller['file'],
-    );
-
-    // Store assertion for display after the test has completed.
-    try {
-      $connection = Database::getConnection('default', 'simpletest_original_default');
-    }
-    catch (ConnectionNotDefinedException $e) {
-      // If the test was not set up, the simpletest_original_default
-      // connection does not exist.
-      $connection = Database::getConnection('default', 'default');
-    }
-    $connection
-      ->insert('simpletest')
-      ->fields($assertion)
-      ->execute();
-
-    // We do not use a ternary operator here to allow a breakpoint on
-    // test failure.
-    if ($status == 'pass') {
-      return TRUE;
-    }
-    else {
-      return FALSE;
-    }
-  }
-
-  /**
-   * Store an assertion from outside the testing context.
-   *
-   * This is useful for inserting assertions that can only be recorded after
-   * the test case has been destroyed, such as PHP fatal errors. The caller
-   * information is not automatically gathered since the caller is most likely
-   * inserting the assertion on behalf of other code. In all other respects
-   * the method behaves just like DrupalTestCase::assert() in terms of storing
-   * the assertion.
-   *
-   * @return
-   *   Message ID of the stored assertion.
-   *
-   * @see DrupalTestCase::assert()
-   * @see DrupalTestCase::deleteAssert()
-   */
-  public static function insertAssert($test_id, $test_class, $status, $message = '', $group = 'Other', array $caller = array()) {
-    // Convert boolean status to string status.
-    if (is_bool($status)) {
-      $status = $status ? 'pass' : 'fail';
-    }
-
-    $caller += array(
-      'function' => t('Unknown'),
-      'line' => 0,
-      'file' => t('Unknown'),
-    );
-
-    $assertion = array(
-      'test_id' => $test_id,
-      'test_class' => $test_class,
-      'status' => $status,
-      'message' => $message,
-      'message_group' => $group,
-      'function' => $caller['function'],
-      'line' => $caller['line'],
-      'file' => $caller['file'],
-    );
-
-    return db_insert('simpletest')
-      ->fields($assertion)
-      ->execute();
-  }
-
-  /**
-   * Delete an assertion record by message ID.
-   *
-   * @param $message_id
-   *   Message ID of the assertion to delete.
-   * @return
-   *   TRUE if the assertion was deleted, FALSE otherwise.
-   *
-   * @see DrupalTestCase::insertAssert()
-   */
-  public static function deleteAssert($message_id) {
-    return (bool) db_delete('simpletest')
-      ->condition('message_id', $message_id)
-      ->execute();
-  }
-
-  /**
-   * Cycles through backtrace until the first non-assertion method is found.
-   *
-   * @return
-   *   Array representing the true caller.
-   */
-  protected function getAssertionCall() {
-    $backtrace = debug_backtrace();
-
-    // The first element is the call. The second element is the caller.
-    // We skip calls that occurred in one of the methods of our base classes
-    // or in an assertion function.
-   while (($caller = $backtrace[1]) &&
-         ((isset($caller['class']) && isset($this->skipClasses[$caller['class']])) ||
-           substr($caller['function'], 0, 6) == 'assert')) {
-      // We remove that call.
-      array_shift($backtrace);
-    }
-
-    return _drupal_get_last_caller($backtrace);
-  }
-
-  /**
-   * Check to see if a value is not false (not an empty string, 0, NULL, or FALSE).
-   *
-   * @param $value
-   *   The value on which the assertion is to be done.
-   * @param $message
-   *   The message to display along with the assertion.
-   * @param $group
-   *   The type of assertion - examples are "Browser", "PHP".
-   * @return
-   *   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);
-  }
-
-  /**
-   * Check to see if a value is false (an empty string, 0, NULL, or FALSE).
-   *
-   * @param $value
-   *   The value on which the assertion is to be done.
-   * @param $message
-   *   The message to display along with the assertion.
-   * @param $group
-   *   The type of assertion - examples are "Browser", "PHP".
-   * @return
-   *   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);
-  }
-
-  /**
-   * Check to see if a value is NULL.
-   *
-   * @param $value
-   *   The value on which the assertion is to be done.
-   * @param $message
-   *   The message to display along with the assertion.
-   * @param $group
-   *   The type of assertion - examples are "Browser", "PHP".
-   * @return
-   *   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);
-  }
-
-  /**
-   * Check to see if a value is not NULL.
-   *
-   * @param $value
-   *   The value on which the assertion is to be done.
-   * @param $message
-   *   The message to display along with the assertion.
-   * @param $group
-   *   The type of assertion - examples are "Browser", "PHP".
-   * @return
-   *   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);
-  }
-
-  /**
-   * Check to see if two values are equal.
-   *
-   * @param $first
-   *   The first value to check.
-   * @param $second
-   *   The second value to check.
-   * @param $message
-   *   The message to display along with the assertion.
-   * @param $group
-   *   The type of assertion - examples are "Browser", "PHP".
-   * @return
-   *   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);
-  }
-
-  /**
-   * Check to see if two values are not equal.
-   *
-   * @param $first
-   *   The first value to check.
-   * @param $second
-   *   The second value to check.
-   * @param $message
-   *   The message to display along with the assertion.
-   * @param $group
-   *   The type of assertion - examples are "Browser", "PHP".
-   * @return
-   *   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);
-  }
-
-  /**
-   * Check to see if two values are identical.
-   *
-   * @param $first
-   *   The first value to check.
-   * @param $second
-   *   The second value to check.
-   * @param $message
-   *   The message to display along with the assertion.
-   * @param $group
-   *   The type of assertion - examples are "Browser", "PHP".
-   * @return
-   *   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);
-  }
-
-  /**
-   * Check to see if two values are not identical.
-   *
-   * @param $first
-   *   The first value to check.
-   * @param $second
-   *   The second value to check.
-   * @param $message
-   *   The message to display along with the assertion.
-   * @param $group
-   *   The type of assertion - examples are "Browser", "PHP".
-   * @return
-   *   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);
-  }
-
-  /**
-   * Fire an assertion that is always positive.
-   *
-   * @param $message
-   *   The message to display along with the assertion.
-   * @param $group
-   *   The type of assertion - examples are "Browser", "PHP".
-   * @return
-   *   TRUE.
-   */
-  protected function pass($message = NULL, $group = 'Other') {
-    return $this->assert(TRUE, $message, $group);
-  }
-
-  /**
-   * Fire an assertion that is always negative.
-   *
-   * @param $message
-   *   The message to display along with the assertion.
-   * @param $group
-   *   The type of assertion - examples are "Browser", "PHP".
-   * @return
-   *   FALSE.
-   */
-  protected function fail($message = NULL, $group = 'Other') {
-    return $this->assert(FALSE, $message, $group);
-  }
-
-  /**
-   * Fire an error assertion.
-   *
-   * @param $message
-   *   The message to display along with the assertion.
-   * @param $group
-   *   The type of assertion - examples are "Browser", "PHP".
-   * @param $caller
-   *   The caller of the error.
-   * @return
-   *   FALSE.
-   */
-  protected function error($message = '', $group = 'Other', array $caller = NULL) {
-    if ($group == 'User notice') {
-      // Since 'User notice' is set by trigger_error() which is used for debug
-      // set the message to a status of 'debug'.
-      return $this->assert('debug', $message, 'Debug', $caller);
-    }
-
-    return $this->assert('exception', $message, $group, $caller);
-  }
-
-  /**
-   * Logs verbose message in a text file.
-   *
-   * The a link to the vebose message will be placed in the test results via
-   * as a passing assertion with the text '[verbose message]'.
-   *
-   * @param $message
-   *   The verbose message to be stored.
-   *
-   * @see simpletest_verbose()
-   */
-  protected function verbose($message) {
-    if ($id = simpletest_verbose($message)) {
-      $url = file_create_url($this->originalFileDirectory . '/simpletest/verbose/' . get_class($this) . '-' . $id . '.html');
-      $this->error(l(t('Verbose message'), $url, array('attributes' => array('target' => '_blank'))), 'User notice');
-    }
-  }
-
-  /**
-   * Run all tests in this class.
-   *
-   * Regardless of whether $methods are passed or not, only method names
-   * starting with "test" are executed.
-   *
-   * @param $methods
-   *   (optional) A list of method names in the test case class to run; e.g.,
-   *   array('testFoo', 'testBar'). By default, all methods of the class are
-   *   taken into account, but it can be useful to only run a few selected test
-   *   methods during debugging.
-   */
-  public function run(array $methods = array()) {
-    // Initialize verbose debugging.
-    simpletest_verbose(NULL, variable_get('file_public_path', conf_path() . '/files'), get_class($this));
-
-    // HTTP auth settings (<username>:<password>) for the simpletest browser
-    // when sending requests to the test site.
-    $this->httpauth_method = variable_get('simpletest_httpauth_method', CURLAUTH_BASIC);
-    $username = variable_get('simpletest_httpauth_username', NULL);
-    $password = variable_get('simpletest_httpauth_password', NULL);
-    if ($username && $password) {
-      $this->httpauth_credentials = $username . ':' . $password;
-    }
-
-    set_error_handler(array($this, 'errorHandler'));
-    $class = get_class($this);
-    // Iterate through all the methods in this class, unless a specific list of
-    // methods to run was passed.
-    $class_methods = get_class_methods($class);
-    if ($methods) {
-      $class_methods = array_intersect($class_methods, $methods);
-    }
-    $missing_requirements = $this->checkRequirements();
-    if (!empty($missing_requirements)) {
-      $missing_requirements_object = new ReflectionObject($this);
-      $caller = array(
-        'file' => $missing_requirements_object->getFileName(),
-      );
-      foreach ($missing_requirements as $missing_requirement) {
-        DrupalTestCase::insertAssert($this->testId, $class, FALSE, $missing_requirement, 'Requirements check.', $caller);
-      }
-    }
-    else {
-      foreach ($class_methods as $method) {
-        // If the current method starts with "test", run it - it's a test.
-        if (strtolower(substr($method, 0, 4)) == 'test') {
-          // Insert a fail record. This will be deleted on completion to ensure
-          // that testing completed.
-          $method_info = new ReflectionMethod($class, $method);
-          $caller = array(
-            'file' => $method_info->getFileName(),
-            'line' => $method_info->getStartLine(),
-            'function' => $class . '->' . $method . '()',
-          );
-          $completion_check_id = DrupalTestCase::insertAssert($this->testId, $class, FALSE, t('The test did not complete due to a fatal error.'), 'Completion check', $caller);
-          $this->setUp();
-          if ($this->setup) {
-            try {
-              $this->$method();
-              // Finish up.
-            }
-            catch (Exception $e) {
-              $this->exceptionHandler($e);
-            }
-            $this->tearDown();
-          }
-          else {
-            $this->fail(t("The test cannot be executed because it has not been set up properly."));
-          }
-          // Remove the completion check record.
-          DrupalTestCase::deleteAssert($completion_check_id);
-        }
-      }
-    }
-    // Clear out the error messages and restore error handler.
-    drupal_get_messages();
-    restore_error_handler();
-  }
-
-  /**
-   * Handle errors during test runs.
-   *
-   * Because this is registered in set_error_handler(), it has to be public.
-   * @see set_error_handler
-   */
-  public function errorHandler($severity, $message, $file = NULL, $line = NULL) {
-    if ($severity & error_reporting()) {
-      $error_map = array(
-        E_STRICT => 'Run-time notice',
-        E_WARNING => 'Warning',
-        E_NOTICE => 'Notice',
-        E_CORE_ERROR => 'Core error',
-        E_CORE_WARNING => 'Core warning',
-        E_USER_ERROR => 'User error',
-        E_USER_WARNING => 'User warning',
-        E_USER_NOTICE => 'User notice',
-        E_RECOVERABLE_ERROR => 'Recoverable error',
-      );
-
-      $backtrace = debug_backtrace();
-      $this->error($message, $error_map[$severity], _drupal_get_last_caller($backtrace));
-    }
-    return TRUE;
-  }
-
-  /**
-   * Handle exceptions.
-   *
-   * @see set_exception_handler
-   */
-  protected function exceptionHandler($exception) {
-    $backtrace = $exception->getTrace();
-    // Push on top of the backtrace the call that generated the exception.
-    array_unshift($backtrace, array(
-      'line' => $exception->getLine(),
-      'file' => $exception->getFile(),
-    ));
-    require_once DRUPAL_ROOT . '/core/includes/errors.inc';
-    // The exception message is run through check_plain() by _drupal_decode_exception().
-    $this->error(t('%type: !message in %function (line %line of %file).', _drupal_decode_exception($exception)), 'Uncaught exception', _drupal_get_last_caller($backtrace));
-  }
-
-  /**
-   * Generates a random string of ASCII characters of codes 32 to 126.
-   *
-   * The generated string includes alpha-numeric characters and common misc
-   * characters. Use this method when testing general input where the content
-   * is not restricted.
-   *
-   * @param $length
-   *   Length of random string to generate.
-   * @return
-   *   Randomly generated string.
-   */
-  public static function randomString($length = 8) {
-    $str = '';
-    for ($i = 0; $i < $length; $i++) {
-      $str .= chr(mt_rand(32, 126));
-    }
-    return $str;
-  }
-
-  /**
-   * Generates a random string containing letters and numbers.
-   *
-   * The string will always start with a letter. The letters may be upper or
-   * lower case. This method is better for restricted inputs that do not
-   * accept certain characters. For example, when testing input fields that
-   * require machine readable values (i.e. without spaces and non-standard
-   * characters) this method is best.
-   *
-   * @param $length
-   *   Length of random string to generate.
-   * @return
-   *   Randomly generated string.
-   */
-  public static function randomName($length = 8) {
-    $values = array_merge(range(65, 90), range(97, 122), range(48, 57));
-    $max = count($values) - 1;
-    $str = chr(mt_rand(97, 122));
-    for ($i = 1; $i < $length; $i++) {
-      $str .= chr($values[mt_rand(0, $max)]);
-    }
-    return $str;
-  }
-
-  /**
-   * Converts a list of possible parameters into a stack of permutations.
-   *
-   * Takes a list of parameters containing possible values, and converts all of
-   * them into a list of items containing every possible permutation.
-   *
-   * Example:
-   * @code
-   * $parameters = array(
-   *   'one' => array(0, 1),
-   *   'two' => array(2, 3),
-   * );
-   * $permutations = $this->permute($parameters);
-   * // Result:
-   * $permutations == array(
-   *   array('one' => 0, 'two' => 2),
-   *   array('one' => 1, 'two' => 2),
-   *   array('one' => 0, 'two' => 3),
-   *   array('one' => 1, 'two' => 3),
-   * )
-   * @endcode
-   *
-   * @param $parameters
-   *   An associative array of parameters, keyed by parameter name, and whose
-   *   values are arrays of parameter values.
-   *
-   * @return
-   *   A list of permutations, which is an array of arrays. Each inner array
-   *   contains the full list of parameters that have been passed, but with a
-   *   single value only.
-   */
-  public static function generatePermutations($parameters) {
-    $all_permutations = array(array());
-    foreach ($parameters as $parameter => $values) {
-      $new_permutations = array();
-      // Iterate over all values of the parameter.
-      foreach ($values as $value) {
-        // Iterate over all existing permutations.
-        foreach ($all_permutations as $permutation) {
-          // Add the new parameter value to existing permutations.
-          $new_permutations[] = $permutation + array($parameter => $value);
-        }
-      }
-      // Replace the old permutations with the new permutations.
-      $all_permutations = $new_permutations;
-    }
-    return $all_permutations;
-  }
-}
-
-/**
- * Test case for Drupal unit tests.
- *
- * These tests can not access the database nor files. Calling any Drupal
- * function that needs the database will throw exceptions. These include
- * watchdog(), module_implements(), module_invoke_all() etc.
- */
-class DrupalUnitTestCase extends DrupalTestCase {
-
-  /**
-   * Constructor for DrupalUnitTestCase.
-   */
-  function __construct($test_id = NULL) {
-    parent::__construct($test_id);
-    $this->skipClasses[__CLASS__] = TRUE;
-  }
-
-  /**
-   * Sets up unit test environment.
-   *
-   * Unlike DrupalWebTestCase::setUp(), DrupalUnitTestCase::setUp() does not
-   * install modules because tests are performed without accessing the database.
-   * Any required files must be explicitly included by the child class setUp()
-   * method.
-   */
-  protected function setUp() {
-    global $conf;
-
-    // Store necessary current values before switching to the test environment.
-    $this->originalFileDirectory = variable_get('file_public_path', conf_path() . '/files');
-
-    // Reset all statics so that test is performed with a clean environment.
-    drupal_static_reset();
-
-    // Generate temporary prefixed database to ensure that tests have a clean starting point.
-    $this->databasePrefix = Database::getConnection()->prefixTables('{simpletest' . mt_rand(1000, 1000000) . '}');
-
-    // Create test directory.
-    $public_files_directory = $this->originalFileDirectory . '/simpletest/' . substr($this->databasePrefix, 10);
-    file_prepare_directory($public_files_directory, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS);
-    $conf['file_public_path'] = $public_files_directory;
-
-    // Clone the current connection and replace the current prefix.
-    $connection_info = Database::getConnectionInfo('default');
-    Database::renameConnection('default', 'simpletest_original_default');
-    foreach ($connection_info as $target => $value) {
-      $connection_info[$target]['prefix'] = array(
-        'default' => $value['prefix']['default'] . $this->databasePrefix,
-      );
-    }
-    Database::addConnectionInfo('default', 'default', $connection_info['default']);
-
-    // Set user agent to be consistent with web test case.
-    $_SERVER['HTTP_USER_AGENT'] = $this->databasePrefix;
-
-    // If locale is enabled then t() will try to access the database and
-    // subsequently will fail as the database is not accessible.
-    $module_list = module_list();
-    if (isset($module_list['locale'])) {
-      $this->originalModuleList = $module_list;
-      unset($module_list['locale']);
-      module_list(TRUE, FALSE, FALSE, $module_list);
-    }
-    $this->setup = TRUE;
-  }
-
-  protected function tearDown() {
-    global $conf;
-
-    // Get back to the original connection.
-    Database::removeConnection('default');
-    Database::renameConnection('simpletest_original_default', 'default');
-
-    $conf['file_public_path'] = $this->originalFileDirectory;
-    // Restore modules if necessary.
-    if (isset($this->originalModuleList)) {
-      module_list(TRUE, FALSE, FALSE, $this->originalModuleList);
-    }
-  }
-}
+use Drupal\Core\Database\Database;
+use Drupal\Core\Database\ConnectionNotDefinedException;
+use PDO;
+use stdClass;
+use DOMDocument;
+use DOMXPath;
+use SimpleXMLElement;
 
 /**
  * Test case for typical Drupal tests.
  */
-class DrupalWebTestCase extends DrupalTestCase {
+abstract class WebTestBase extends TestBase {
+
   /**
    * The profile to install as a basis for testing.
    *
@@ -837,7 +94,8 @@ class DrupalWebTestCase extends DrupalTestCase {
   /**
    * Additional cURL options.
    *
-   * DrupalWebTestCase itself never sets this but always obeys what is set.
+   * Drupal\simpletest\WebTestBase itself never sets this but always obeys what is
+   * set.
    */
   protected $additionalCurlOptions = array();
 
@@ -886,7 +144,7 @@ class DrupalWebTestCase extends DrupalTestCase {
   protected $redirect_count;
 
   /**
-   * Constructor for DrupalWebTestCase.
+   * Constructor for Drupal\simpletest\WebTestBase.
    */
   function __construct($test_id = NULL) {
     parent::__construct($test_id);
@@ -1281,14 +539,14 @@ protected function drupalLogout() {
    *
    * The generated database table prefix is used for the Drupal installation
    * being performed for the test. It is also used as user agent HTTP header
-   * value by the cURL-based browser of DrupalWebTestCase, which is sent to the
-   * Drupal installation of the test. During early Drupal bootstrap, the user
-   * agent HTTP header is parsed, and if it matches, all database queries use
-   * the database table prefix that has been generated here.
+   * value by the cURL-based browser of Drupal\simpletest\WebTestBase, which is sent
+   * to the Drupal installation of the test. During early Drupal bootstrap, the
+   * user agent HTTP header is parsed, and if it matches, all database queries
+   * use the database table prefix that has been generated here.
    *
-   * @see DrupalWebTestCase::curlInitialize()
+   * @see Drupal\simpletest\WebTestBase::curlInitialize()
    * @see drupal_valid_test_ua()
-   * @see DrupalWebTestCase::setUp()
+   * @see Drupal\simpletest\WebTestBase::setUp()
    */
   protected function prepareDatabasePrefix() {
     $this->databasePrefix = 'simpletest' . mt_rand(1000, 1000000);
@@ -1305,7 +563,7 @@ protected function prepareDatabasePrefix() {
   /**
    * Changes the database connection to the prefixed one.
    *
-   * @see DrupalWebTestCase::setUp()
+   * @see Drupal\simpletest\WebTestBase::setUp()
    */
   protected function changeDatabasePrefix() {
     if (empty($this->databasePrefix)) {
@@ -1333,8 +591,8 @@ protected function changeDatabasePrefix() {
    * Also sets up new resources for the testing environment, such as the public
    * filesystem and configuration directories.
    *
-   * @see DrupalWebTestCase::setUp()
-   * @see DrupalWebTestCase::tearDown()
+   * @see Drupal\simpletest\WebTestBase::setUp()
+   * @see Drupal\simpletest\WebTestBase::tearDown()
    */
   protected function prepareEnvironment() {
     global $user, $language_interface, $conf;
@@ -1391,9 +649,9 @@ protected function prepareEnvironment() {
    * Sets up a Drupal site for running functional and integration tests.
    *
    * Generates a random database prefix and installs Drupal with the specified
-   * installation profile in DrupalWebTestCase::$profile into the prefixed
-   * database. Afterwards, installs any additional modules specified by the
-   * test.
+   * installation profile in Drupal\simpletest\WebTestBase::$profile into the
+   * prefixed database. Afterwards, installs any additional modules specified by
+   * the test.
    *
    * After installation all caches are flushed and several configuration values
    * are reset to the values of the parent site executing the test, since the
@@ -1404,9 +662,9 @@ protected function prepareEnvironment() {
    *   List of modules to enable for the duration of the test. This can be
    *   either a single array or a variable number of string arguments.
    *
-   * @see DrupalWebTestCase::prepareDatabasePrefix()
-   * @see DrupalWebTestCase::changeDatabasePrefix()
-   * @see DrupalWebTestCase::prepareEnvironment()
+   * @see Drupal\simpletest\WebTestBase::prepareDatabasePrefix()
+   * @see Drupal\simpletest\WebTestBase::changeDatabasePrefix()
+   * @see Drupal\simpletest\WebTestBase::prepareEnvironment()
    */
   protected function setUp() {
     global $user, $language_interface, $conf;
@@ -1511,8 +769,8 @@ protected function setUp() {
   /**
    * Preload the registry from the testing site.
    *
-   * This method is called by DrupalWebTestCase::setUp(), and preloads the
-   * registry from the testing site to cut down on the time it takes to
+   * This method is called by Drupal\simpletest\WebTestBase::setUp(), and preloads
+   * the registry from the testing site to cut down on the time it takes to
    * set up a clean environment for the current test run.
    */
   protected function preloadRegistry() {
@@ -1547,7 +805,7 @@ protected function preloadRegistry() {
   /**
    * Reset all data structures after having enabled new modules.
    *
-   * This method is called by DrupalWebTestCase::setUp() after enabling
+   * This method is called by Drupal\simpletest\WebTestBase::setUp() after enabling
    * the requested modules. It must be called again when additional modules
    * are enabled later.
    */
@@ -1797,9 +1055,9 @@ protected function curlHeaderCallback($curlHandler, $header) {
 
     // Errors are being sent via X-Drupal-Assertion-* headers,
     // generated by _drupal_log_error() in the exact form required
-    // by DrupalWebTestCase::error().
+    // by Drupal\simpletest\WebTestBase::error().
     if (preg_match('/^X-Drupal-Assertion-[0-9]+: (.*)$/', $header, $matches)) {
-      // Call DrupalWebTestCase::error() with the parameters from the header.
+      // Call Drupal\simpletest\WebTestBase::error() with the parameters from the header.
       call_user_func_array(array(&$this, 'error'), unserialize(urldecode($matches[1])));
     }
 
@@ -3608,51 +2866,3 @@ protected function verboseEmail($count = 1) {
     }
   }
 }
-
-/**
- * Logs verbose message in a text file.
- *
- * If verbose mode is enabled then page requests will be dumped to a file and
- * presented on the test result screen. The messages will be placed in a file
- * located in the simpletest directory in the original file system.
- *
- * @param $message
- *   The verbose message to be stored.
- * @param $original_file_directory
- *   The original file directory, before it was changed for testing purposes.
- * @param $test_class
- *   The active test case class.
- *
- * @return
- *   The ID of the message to be placed in related assertion messages.
- *
- * @see DrupalTestCase->originalFileDirectory
- * @see DrupalWebTestCase->verbose()
- */
-function simpletest_verbose($message, $original_file_directory = NULL, $test_class = NULL) {
-  static $file_directory = NULL, $class = NULL, $id = 1, $verbose = NULL;
-
-  // Will pass first time during setup phase, and when verbose is TRUE.
-  if (!isset($original_file_directory) && !$verbose) {
-    return FALSE;
-  }
-
-  if ($message && $file_directory) {
-    $message = '<hr />ID #' . $id . ' (<a href="' . $class . '-' . ($id - 1) . '.html">Previous</a> | <a href="' . $class . '-' . ($id + 1) . '.html">Next</a>)<hr />' . $message;
-    file_put_contents($file_directory . "/simpletest/verbose/$class-$id.html", $message, FILE_APPEND);
-    return $id++;
-  }
-
-  if ($original_file_directory) {
-    $file_directory = $original_file_directory;
-    $class = $test_class;
-    $verbose = variable_get('simpletest_verbose', TRUE);
-    $directory = $file_directory . '/simpletest/verbose';
-    $writable = file_prepare_directory($directory, FILE_CREATE_DIRECTORY);
-    if ($writable && !file_exists($directory . '/.htaccess')) {
-      file_put_contents($directory . '/.htaccess', "<IfModule mod_expires.c>\nExpiresActive Off\n</IfModule>\n");
-    }
-    return $writable;
-  }
-  return FALSE;
-}
diff --git a/core/modules/simpletest/simpletest.api.php b/core/modules/simpletest/simpletest.api.php
index 04c080bfd544ba107180042d4f88378579d153ae..df6d634cb355d1594c072d9a793633aba68fa61b 100644
--- a/core/modules/simpletest/simpletest.api.php
+++ b/core/modules/simpletest/simpletest.api.php
@@ -5,6 +5,18 @@
  * Hooks provided by the SimpleTest module.
  */
 
+/**
+ * Global variable that holds information about the tests being run.
+ *
+ * An array, with the following keys:
+ *  - 'test_run_id': the ID of the test being run, in the form 'simpletest_%"
+ *  - 'in_child_site': TRUE if the current request is a cURL request from
+ *     the parent site.
+ *
+ * @var array
+ */
+global $drupal_test_info;
+
 /**
  * @addtogroup hooks
  * @{
@@ -47,9 +59,9 @@ function hook_test_group_finished() {
  * This hook is called when an individual test has finished.
  *
  * @param
- *   $results The results of the test as gathered by DrupalWebTestCase.
+ *   $results The results of the test as gathered by Drupal\simpletest\WebTestBase.
  *
- * @see DrupalWebTestCase->results
+ * @see Drupal\simpletest\WebTestBase->results()
  */
 function hook_test_finished($results) {
 }
diff --git a/core/modules/simpletest/simpletest.module b/core/modules/simpletest/simpletest.module
index 9bd735e61b37c841e0c5bc0a5e02a4edf82ef739..38c360bc4fb2bc7b3e7f33bac9bb99e75d050bc7 100644
--- a/core/modules/simpletest/simpletest.module
+++ b/core/modules/simpletest/simpletest.module
@@ -1,6 +1,7 @@
 <?php
 
 use Drupal\Core\Database\Database;
+use Drupal\simpletest\TestBase;
 
 /**
  * @file
@@ -272,11 +273,11 @@ function simpletest_log_read($test_id, $prefix, $test_class, $during_test = FALS
           'line' => $match[4],
           'file' => $match[3],
         );
-        DrupalTestCase::insertAssert($test_id, $test_class, FALSE, $match[2], $match[1], $caller);
+        TestBase::insertAssert($test_id, $test_class, FALSE, $match[2], $match[1], $caller);
       }
       else {
         // Unknown format, place the entire message in the log.
-        DrupalTestCase::insertAssert($test_id, $test_class, FALSE, $line, 'Fatal error');
+        TestBase::insertAssert($test_id, $test_class, FALSE, $line, 'Fatal error');
       }
       $found = TRUE;
     }
@@ -565,3 +566,51 @@ function simpletest_mail_alter(&$message) {
     $message['send'] = FALSE;
   }
 }
+
+/**
+ * Logs verbose message in a text file.
+ *
+ * If verbose mode is enabled then page requests will be dumped to a file and
+ * presented on the test result screen. The messages will be placed in a file
+ * located in the simpletest directory in the original file system.
+ *
+ * @param $message
+ *   The verbose message to be stored.
+ * @param $original_file_directory
+ *   The original file directory, before it was changed for testing purposes.
+ * @param $test_class
+ *   The active test case class.
+ *
+ * @return
+ *   The ID of the message to be placed in related assertion messages.
+ *
+ * @see Drupal\simpletest\TestBase->originalFileDirectory()
+ * @see Drupal\simpletest\WebTestBase->verbose()
+ */
+function simpletest_verbose($message, $original_file_directory = NULL, $test_class = NULL) {
+  static $file_directory = NULL, $class = NULL, $id = 1, $verbose = NULL;
+
+  // Will pass first time during setup phase, and when verbose is TRUE.
+  if (!isset($original_file_directory) && !$verbose) {
+    return FALSE;
+  }
+
+  if ($message && $file_directory) {
+    $message = '<hr />ID #' . $id . ' (<a href="' . $class . '-' . ($id - 1) . '.html">Previous</a> | <a href="' . $class . '-' . ($id + 1) . '.html">Next</a>)<hr />' . $message;
+    file_put_contents($file_directory . "/simpletest/verbose/$class-$id.html", $message, FILE_APPEND);
+    return $id++;
+  }
+
+  if ($original_file_directory) {
+    $file_directory = $original_file_directory;
+    $class = $test_class;
+    $verbose = variable_get('simpletest_verbose', TRUE);
+    $directory = $file_directory . '/simpletest/verbose';
+    $writable = file_prepare_directory($directory, FILE_CREATE_DIRECTORY);
+    if ($writable && !file_exists($directory . '/.htaccess')) {
+      file_put_contents($directory . '/.htaccess', "<IfModule mod_expires.c>\nExpiresActive Off\n</IfModule>\n");
+    }
+    return $writable;
+  }
+  return FALSE;
+}
diff --git a/core/modules/simpletest/simpletest.test b/core/modules/simpletest/simpletest.test
index 185a71ab55cf5b171f389079687117a7348d5c1a..cc4e026cd2f10ec07ccc105a27834ab5ec4cb21d 100644
--- a/core/modules/simpletest/simpletest.test
+++ b/core/modules/simpletest/simpletest.test
@@ -5,7 +5,10 @@
  * Tests for simpletest.module.
  */
 
-class SimpleTestFunctionalTest extends DrupalWebTestCase {
+use Drupal\simpletest\WebTestBase;
+use Drupal\simpletest\UnitTestBase;
+
+class SimpleTestFunctionalTest extends WebTestBase {
   /**
    * The results array that has been parsed by getTestResults().
    */
@@ -323,7 +326,7 @@ class SimpleTestFunctionalTest extends DrupalWebTestCase {
 /**
  * Test internal testing framework browser.
  */
-class SimpleTestBrowserTestCase extends DrupalWebTestCase {
+class SimpleTestBrowserTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'SimpleTest browser',
@@ -338,7 +341,7 @@ class SimpleTestBrowserTestCase extends DrupalWebTestCase {
   }
 
   /**
-   * Test DrupalWebTestCase::getAbsoluteUrl().
+   * Test Drupal\simpletest\WebTestBase::getAbsoluteUrl().
    */
   function testGetAbsoluteUrl() {
     $url = 'user/login';
@@ -382,7 +385,7 @@ EOF;
   }
 }
 
-class SimpleTestMailCaptureTestCase extends DrupalWebTestCase {
+class SimpleTestMailCaptureTestCase extends WebTestBase {
   /**
    * Implement getInfo().
    */
@@ -461,7 +464,7 @@ class SimpleTestMailCaptureTestCase extends DrupalWebTestCase {
 /**
  * Test Folder creation
  */
-class SimpleTestFolderTestCase extends DrupalWebTestCase {
+class SimpleTestFolderTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Testing SimpleTest setUp',
@@ -483,7 +486,7 @@ class SimpleTestFolderTestCase extends DrupalWebTestCase {
 /**
  * Test required modules for tests.
  */
-class SimpleTestMissingDependentModuleUnitTest extends DrupalUnitTestCase {
+class SimpleTestMissingDependentModuleUnitTest extends UnitTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Testing dependent module test',
@@ -505,12 +508,13 @@ class SimpleTestMissingDependentModuleUnitTest extends DrupalUnitTestCase {
  * Tests a test case that does not run parent::setUp() in its setUp() method.
  *
  * If a test case does not call parent::setUp(), running
- * DrupalTestCase::tearDown() would destroy the main site's database tables.
- * Therefore, we ensure that tests which are not set up properly are skipped.
+ * Drupal\simpletest\WebTestBase::tearDown() would destroy the main site's
+ * database tables. Therefore, we ensure that tests which are not set up
+ * properly are skipped.
  *
- * @see DrupalTestCase
+ * @see Drupal\simpletest\WebTestBase
  */
-class SimpleTestBrokenSetUp extends DrupalWebTestCase {
+class SimpleTestBrokenSetUp extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Broken SimpleTest method',
@@ -571,7 +575,7 @@ class SimpleTestBrokenSetUp extends DrupalWebTestCase {
 /**
  * Tests missing requirements to run test.
  */
-class SimpleTestMissingCheckedRequirements extends DrupalWebTestCase {
+class SimpleTestMissingCheckedRequirements extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Broken requirements test',
@@ -620,7 +624,7 @@ class SimpleTestMissingCheckedRequirements extends DrupalWebTestCase {
 /**
  * Verifies that tests bundled with installation profile modules are found.
  */
-class SimpleTestInstallationProfileModuleTestsTestCase extends DrupalWebTestCase {
+class SimpleTestInstallationProfileModuleTestsTestCase extends WebTestBase {
   /**
    * Use the Testing profile.
    *
@@ -669,7 +673,7 @@ class SimpleTestInstallationProfileModuleTestsTestCase extends DrupalWebTestCase
  *
  * @see SimpleTestInstallationProfileModuleTestsTestCase
  */
-class SimpleTestOtherInstallationProfileModuleTestsTestCase extends DrupalWebTestCase {
+class SimpleTestOtherInstallationProfileModuleTestsTestCase extends WebTestBase {
   /**
    * Use the Minimal profile.
    *
diff --git a/core/modules/statistics/statistics.test b/core/modules/statistics/statistics.test
index 331476174b1d1cca97b44c93c3c2a6664293702c..bb28b01cb3dba278569a6f4406f6f3a52996f488 100644
--- a/core/modules/statistics/statistics.test
+++ b/core/modules/statistics/statistics.test
@@ -5,10 +5,12 @@
  * Tests for the Statistics module.
  */
 
+use Drupal\simpletest\WebTestBase;
+
 /**
  * Defines a base class for testing the Statistics module.
  */
-class StatisticsTestCase extends DrupalWebTestCase {
+class StatisticsTestCase extends WebTestBase {
 
   function setUp() {
     parent::setUp(array('node', 'block', 'statistics'));
@@ -53,10 +55,10 @@ class StatisticsTestCase extends DrupalWebTestCase {
 /**
  * Tests that logging via statistics_exit() works for all pages.
  *
- * We subclass DrupalWebTestCase rather than StatisticsTestCase, because we
+ * We subclass WebTestBase rather than StatisticsTestCase, because we
  * want to test requests from an anonymous user.
  */
-class StatisticsLoggingTestCase extends DrupalWebTestCase {
+class StatisticsLoggingTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Statistics logging tests',
@@ -319,7 +321,7 @@ class StatisticsBlockVisitorsTestCase extends StatisticsTestCase {
 /**
  * Tests the statistics administration screen.
  */
-class StatisticsAdminTestCase extends DrupalWebTestCase {
+class StatisticsAdminTestCase extends WebTestBase {
 
   /**
    * A user that has permission to administer and access statistics.
diff --git a/core/modules/syslog/syslog.test b/core/modules/syslog/syslog.test
index 1f7ab2ea8bf8f216d4a62ab959f9db5c9f437eb1..49da077d1ea67e393c1d57d993a20a97fcf520bd 100644
--- a/core/modules/syslog/syslog.test
+++ b/core/modules/syslog/syslog.test
@@ -5,10 +5,12 @@
  * Tests for syslog.module.
  */
 
+use Drupal\simpletest\WebTestBase;
+
 /**
  * Tests the Syslog module functionality.
  */
-class SyslogTestCase extends DrupalWebTestCase {
+class SyslogTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Syslog functionality',
diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php
index 574a132b7be6b421281ef36cbb1f347aa1c98220..0b66f2c3d610cd4e9dbc35347851eb55a5c24e31 100644
--- a/core/modules/system/system.api.php
+++ b/core/modules/system/system.api.php
@@ -5,6 +5,8 @@
  * Hooks provided by Drupal core and the System module.
  */
 
+use Drupal\Core\Utility\UpdateException;
+
 /**
  * @addtogroup hooks
  * @{
@@ -2968,10 +2970,11 @@ function hook_install() {
  * @param $sandbox
  *   Stores information for multipass updates. See above for more information.
  *
- * @throws DrupalUpdateException, PDOException
- *   In case of error, update hooks should throw an instance of DrupalUpdateException
- *   with a meaningful message for the user. If a database query fails for whatever
- *   reason, it will throw a PDOException.
+ * @throws Drupal\Core\Utility\UpdateException, PDOException
+ *   In case of error, update hooks should throw an instance of
+ *   Drupal\Core\Utility\UpdateException with a meaningful message for the user.
+ *   If a database query fails for whatever reason, it will throw a
+ *   PDOException.
  *
  * @return
  *   Optionally update hooks may return a translated string that will be displayed
@@ -3022,7 +3025,7 @@ function hook_update_N(&$sandbox) {
   return t('The update did what it was supposed to do.');
 
   // In case of an error, simply throw an exception with an error message.
-  throw new DrupalUpdateException('Something went wrong; here is what you should do.');
+  throw new UpdateException('Something went wrong; here is what you should do.');
 }
 
 /**
diff --git a/core/modules/system/system.test b/core/modules/system/system.test
index a938ea11fc6d5f48afd53f18d105fd975bcee05d..6041215b2ed98354cd10876e23e47ed0690354b0 100644
--- a/core/modules/system/system.test
+++ b/core/modules/system/system.test
@@ -2,6 +2,8 @@
 
 use Drupal\Core\Database\Database;
 use Drupal\Component\Graph\Graph;
+use Drupal\simpletest\WebTestBase;
+use Drupal\simpletest\UnitTestBase;
 
 /**
  * @file
@@ -11,7 +13,7 @@ use Drupal\Component\Graph\Graph;
 /**
  * Helper class for module test cases.
  */
-class ModuleTestCase extends DrupalWebTestCase {
+class ModuleTestCase extends WebTestBase {
   protected $admin_user;
 
   function setUp() {
@@ -709,7 +711,7 @@ class ModuleRequiredTestCase extends ModuleTestCase {
   }
 }
 
-class IPAddressBlockingTestCase extends DrupalWebTestCase {
+class IPAddressBlockingTestCase extends WebTestBase {
   protected $blocking_user;
 
   /**
@@ -788,7 +790,7 @@ class IPAddressBlockingTestCase extends DrupalWebTestCase {
   }
 }
 
-class CronRunTestCase extends DrupalWebTestCase {
+class CronRunTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Cron run',
@@ -920,7 +922,7 @@ class CronRunTestCase extends DrupalWebTestCase {
   }
 }
 
-class AdminMetaTagTestCase extends DrupalWebTestCase {
+class AdminMetaTagTestCase extends WebTestBase {
   /**
    * Implement getInfo().
    */
@@ -943,7 +945,7 @@ class AdminMetaTagTestCase extends DrupalWebTestCase {
   }
 }
 
-class DefaultMobileMetaTagsTestCase extends DrupalWebTestCase {
+class DefaultMobileMetaTagsTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Default mobile meta tags',
@@ -987,7 +989,7 @@ class DefaultMobileMetaTagsTestCase extends DrupalWebTestCase {
 /**
  * Tests custom access denied functionality.
  */
-class AccessDeniedTestCase extends DrupalWebTestCase {
+class AccessDeniedTestCase extends WebTestBase {
   protected $admin_user;
 
   public static function getInfo() {
@@ -1064,7 +1066,7 @@ class AccessDeniedTestCase extends DrupalWebTestCase {
   }
 }
 
-class PageNotFoundTestCase extends DrupalWebTestCase {
+class PageNotFoundTestCase extends WebTestBase {
   protected $admin_user;
 
   public static function getInfo() {
@@ -1104,7 +1106,7 @@ class PageNotFoundTestCase extends DrupalWebTestCase {
 /**
  * Tests site maintenance functionality.
  */
-class SiteMaintenanceTestCase extends DrupalWebTestCase {
+class SiteMaintenanceTestCase extends WebTestBase {
   protected $admin_user;
 
   public static function getInfo() {
@@ -1208,7 +1210,7 @@ class SiteMaintenanceTestCase extends DrupalWebTestCase {
 /**
  * Tests generic date and time handling capabilities of Drupal.
  */
-class DateTimeFunctionalTest extends DrupalWebTestCase {
+class DateTimeFunctionalTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Date and time',
@@ -1401,7 +1403,7 @@ class DateTimeFunctionalTest extends DrupalWebTestCase {
   }
 }
 
-class PageTitleFiltering extends DrupalWebTestCase {
+class PageTitleFiltering extends WebTestBase {
   protected $content_user;
   protected $saved_title;
 
@@ -1510,7 +1512,7 @@ class PageTitleFiltering extends DrupalWebTestCase {
 /**
  * Test front page functionality and administration.
  */
-class FrontPageTestCase extends DrupalWebTestCase {
+class FrontPageTestCase extends WebTestBase {
 
   public static function getInfo() {
     return array(
@@ -1564,7 +1566,7 @@ class FrontPageTestCase extends DrupalWebTestCase {
   }
 }
 
-class SystemBlockTestCase extends DrupalWebTestCase {
+class SystemBlockTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Block functionality',
@@ -1631,7 +1633,7 @@ class SystemBlockTestCase extends DrupalWebTestCase {
 /**
  * Test main content rendering fallback provided by system module.
  */
-class SystemMainContentFallback extends DrupalWebTestCase {
+class SystemMainContentFallback extends WebTestBase {
   protected $admin_user;
   protected $web_user;
 
@@ -1709,7 +1711,7 @@ class SystemMainContentFallback extends DrupalWebTestCase {
 /**
  * Tests for the theme interface functionality.
  */
-class SystemThemeFunctionalTest extends DrupalWebTestCase {
+class SystemThemeFunctionalTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Theme interface functionality',
@@ -1933,7 +1935,7 @@ class SystemThemeFunctionalTest extends DrupalWebTestCase {
 /**
  * Test token replacement in strings.
  */
-class TokenReplaceTestCase extends DrupalWebTestCase {
+class TokenReplaceTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Token replacement',
@@ -2089,7 +2091,7 @@ class TokenReplaceTestCase extends DrupalWebTestCase {
   }
 }
 
-class InfoFileParserTestCase extends DrupalUnitTestCase {
+class InfoFileParserTestCase extends UnitTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Info file format parser',
@@ -2163,7 +2165,7 @@ array_space[a b] = Value';
 /**
  * Tests the effectiveness of hook_system_info_alter().
  */
-class SystemInfoAlterTestCase extends DrupalWebTestCase {
+class SystemInfoAlterTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'System info alter',
@@ -2230,7 +2232,7 @@ class SystemInfoAlterTestCase extends DrupalWebTestCase {
 /**
  * Tests for the update system functionality.
  */
-class UpdateScriptFunctionalTest extends DrupalWebTestCase {
+class UpdateScriptFunctionalTest extends WebTestBase {
   private $update_url;
   private $update_user;
 
@@ -2399,7 +2401,7 @@ class UpdateScriptFunctionalTest extends DrupalWebTestCase {
 /**
  * Functional tests for the flood control mechanism.
  */
-class FloodFunctionalTest extends DrupalWebTestCase {
+class FloodFunctionalTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Flood control mechanism',
@@ -2437,7 +2439,7 @@ class FloodFunctionalTest extends DrupalWebTestCase {
 /**
  * Test HTTP file downloading capability.
  */
-class RetrieveFileTestCase extends DrupalWebTestCase {
+class RetrieveFileTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'HTTP file retrieval',
@@ -2486,7 +2488,7 @@ class RetrieveFileTestCase extends DrupalWebTestCase {
 /**
  * Functional tests shutdown functions.
  */
-class ShutdownFunctionsTest extends DrupalWebTestCase {
+class ShutdownFunctionsTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Shutdown functions',
@@ -2518,7 +2520,7 @@ class ShutdownFunctionsTest extends DrupalWebTestCase {
 /**
  * Tests administrative overview pages.
  */
-class SystemAdminTestCase extends DrupalWebTestCase {
+class SystemAdminTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Administrative pages',
@@ -2633,7 +2635,7 @@ class SystemAdminTestCase extends DrupalWebTestCase {
  *
  * @see Drupal\Component\Graph\Graph
  */
-class GraphUnitTest extends DrupalUnitTestCase {
+class GraphUnitTest extends UnitTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Directed acyclic graph manipulation',
@@ -2818,7 +2820,7 @@ class GraphUnitTest extends DrupalUnitTestCase {
 /**
  * Tests authorize.php and related hooks.
  */
-class SystemAuthorizeCase extends DrupalWebTestCase {
+class SystemAuthorizeCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Authorize API',
@@ -2871,7 +2873,7 @@ class SystemAuthorizeCase extends DrupalWebTestCase {
 /**
  * Test the handling of requests containing 'index.php'.
  */
-class SystemIndexPhpTest extends DrupalWebTestCase {
+class SystemIndexPhpTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Index.php handling',
diff --git a/core/modules/system/tests/actions.test b/core/modules/system/tests/actions.test
index afcb6864dd8672ac86a878b57478dfa7aab661cd..469b16e13d51f5bc321cfe7bfc03907b06ecbc8f 100644
--- a/core/modules/system/tests/actions.test
+++ b/core/modules/system/tests/actions.test
@@ -1,6 +1,8 @@
 <?php
 
-class ActionsConfigurationTestCase extends DrupalWebTestCase {
+use Drupal\simpletest\WebTestBase;
+
+class ActionsConfigurationTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Actions configuration',
@@ -66,7 +68,7 @@ class ActionsConfigurationTestCase extends DrupalWebTestCase {
 /**
  * Test actions executing in a potential loop, and make sure they abort properly.
  */
-class ActionLoopTestCase extends DrupalWebTestCase {
+class ActionLoopTestCase extends WebTestBase {
   protected $aid;
 
   public static function getInfo() {
diff --git a/core/modules/system/tests/ajax.test b/core/modules/system/tests/ajax.test
index 49f1632981bfb9432251d142012d96ebce195703..69b178b84946b30491522f00bc9c2df7e91c2c8f 100644
--- a/core/modules/system/tests/ajax.test
+++ b/core/modules/system/tests/ajax.test
@@ -1,6 +1,9 @@
 <?php
 
-class AJAXTestCase extends DrupalWebTestCase {
+
+use Drupal\simpletest\WebTestBase;
+
+class AJAXTestCase extends WebTestBase {
   function setUp() {
     $modules = func_get_args();
     if (isset($modules[0]) && is_array($modules[0])) {
diff --git a/core/modules/system/tests/batch.test b/core/modules/system/tests/batch.test
index 1e9b31ba1bdc1ac18148107c9c3471fae28a8a98..e39bcf53c8c3c9783b10e401057cb1b177a5bc01 100644
--- a/core/modules/system/tests/batch.test
+++ b/core/modules/system/tests/batch.test
@@ -5,10 +5,14 @@
  * Tests for the Batch API.
  */
 
+
+use Drupal\simpletest\WebTestBase;
+use Drupal\simpletest\UnitTestBase;
+
 /**
  * Tests for the Batch API.
  */
-class BatchProcessingTestCase extends DrupalWebTestCase {
+class BatchProcessingTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Batch processing',
@@ -277,7 +281,7 @@ class BatchProcessingTestCase extends DrupalWebTestCase {
 /**
  * Tests for the Batch API Progress page.
  */
-class BatchPageTestCase extends DrupalWebTestCase {
+class BatchPageTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Batch progress page',
@@ -316,7 +320,7 @@ class BatchPageTestCase extends DrupalWebTestCase {
  * Tests the function _batch_api_percentage() to make sure that the rounding
  * works properly in all cases.
  */
-class BatchPercentagesUnitTestCase extends DrupalUnitTestCase {
+class BatchPercentagesUnitTestCase extends UnitTestBase {
   protected $testCases = array();
 
   public static function getInfo() {
diff --git a/core/modules/system/tests/bootstrap.test b/core/modules/system/tests/bootstrap.test
index 75356173402a7e0e722ad3f2ed418b5e98c0209f..b3650bd2132e40ed978872262afc075407f50754 100644
--- a/core/modules/system/tests/bootstrap.test
+++ b/core/modules/system/tests/bootstrap.test
@@ -1,6 +1,9 @@
 <?php
 
-class BootstrapIPAddressTestCase extends DrupalWebTestCase {
+use Drupal\simpletest\WebTestBase;
+use Drupal\simpletest\UnitTestBase;
+
+class BootstrapIPAddressTestCase extends WebTestBase {
 
   public static function getInfo() {
     return array(
@@ -98,7 +101,7 @@ class BootstrapIPAddressTestCase extends DrupalWebTestCase {
   }
 }
 
-class BootstrapPageCacheTestCase extends DrupalWebTestCase {
+class BootstrapPageCacheTestCase extends WebTestBase {
 
   public static function getInfo() {
     return array(
@@ -231,7 +234,7 @@ class BootstrapPageCacheTestCase extends DrupalWebTestCase {
   }
 }
 
-class BootstrapVariableTestCase extends DrupalWebTestCase {
+class BootstrapVariableTestCase extends WebTestBase {
 
   function setUp() {
     parent::setUp('system_test');
@@ -281,7 +284,7 @@ class BootstrapVariableTestCase extends DrupalWebTestCase {
 /**
  * Test hook_boot() and hook_exit().
  */
-class HookBootExitTestCase extends DrupalWebTestCase {
+class HookBootExitTestCase extends WebTestBase {
 
   public static function getInfo() {
     return array(
@@ -336,7 +339,7 @@ class HookBootExitTestCase extends DrupalWebTestCase {
 /**
  * Test drupal_get_filename()'s availability.
  */
-class BootstrapGetFilenameTestCase extends DrupalUnitTestCase {
+class BootstrapGetFilenameTestCase extends UnitTestBase {
 
   public static function getInfo() {
     return array(
@@ -378,7 +381,7 @@ class BootstrapGetFilenameTestCase extends DrupalUnitTestCase {
   }
 }
 
-class BootstrapTimerTestCase extends DrupalUnitTestCase {
+class BootstrapTimerTestCase extends UnitTestBase {
 
   public static function getInfo() {
     return array(
@@ -413,7 +416,7 @@ class BootstrapTimerTestCase extends DrupalUnitTestCase {
 /**
  * Test that resetting static variables works.
  */
-class BootstrapResettableStaticTestCase extends DrupalUnitTestCase {
+class BootstrapResettableStaticTestCase extends UnitTestBase {
 
   public static function getInfo() {
     return array(
@@ -452,7 +455,7 @@ class BootstrapResettableStaticTestCase extends DrupalUnitTestCase {
 /**
  * Test miscellaneous functions in bootstrap.inc.
  */
-class BootstrapMiscTestCase extends DrupalUnitTestCase {
+class BootstrapMiscTestCase extends UnitTestBase {
 
   public static function getInfo() {
     return array(
@@ -498,7 +501,7 @@ class BootstrapMiscTestCase extends DrupalUnitTestCase {
 /**
  * Tests for overriding server variables via the API.
  */
-class BootstrapOverrideServerVariablesTestCase extends DrupalUnitTestCase {
+class BootstrapOverrideServerVariablesTestCase extends UnitTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Overriding server variables',
diff --git a/core/modules/system/tests/cache.test b/core/modules/system/tests/cache.test
index 66778ae0112c442bc5230de7215e7af320b01299..b1d45cfeee50b2d5cac31641942664d2849adec1 100644
--- a/core/modules/system/tests/cache.test
+++ b/core/modules/system/tests/cache.test
@@ -1,6 +1,8 @@
 <?php
 
-class CacheTestCase extends DrupalWebTestCase {
+use Drupal\simpletest\WebTestBase;
+
+class CacheTestCase extends WebTestBase {
   protected $default_bin = 'page';
   protected $default_cid = 'test_temporary';
   protected $default_value = 'CacheTest';
diff --git a/core/modules/system/tests/common.test b/core/modules/system/tests/common.test
index 46b379ee799ae50b76600956d77cf711ca807c3f..9b6e2be43b1a2d8d857a4c6949bfabd3a7f9b4d7 100644
--- a/core/modules/system/tests/common.test
+++ b/core/modules/system/tests/common.test
@@ -5,10 +5,13 @@
  * Tests for common.inc functionality.
  */
 
+use Drupal\simpletest\WebTestBase;
+use Drupal\simpletest\UnitTestBase;
+
 /**
  * Tests for URL generation functions.
  */
-class CommonDrupalAlterTestCase extends DrupalWebTestCase {
+class CommonDrupalAlterTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Alter hook functionality',
@@ -73,7 +76,7 @@ class CommonDrupalAlterTestCase extends DrupalWebTestCase {
  * url() calls module_implements(), which may issue a db query, which requires
  * inheriting from a web test case rather than a unit test case.
  */
-class CommonURLUnitTestCase extends DrupalWebTestCase {
+class CommonURLUnitTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'URL generation tests',
@@ -280,7 +283,7 @@ class CommonURLUnitTestCase extends DrupalWebTestCase {
 /**
  * Tests for check_plain(), filter_xss(), format_string(), and check_url().
  */
-class CommonXssUnitTestCase extends DrupalUnitTestCase {
+class CommonXssUnitTestCase extends UnitTestBase {
 
   public static function getInfo() {
     return array(
@@ -352,7 +355,7 @@ class CommonXssUnitTestCase extends DrupalUnitTestCase {
 /**
  * Tests file size parsing and formatting functions.
  */
-class CommonSizeUnitTestCase extends DrupalUnitTestCase {
+class CommonSizeUnitTestCase extends UnitTestBase {
   protected $exact_test_cases;
   protected $rounded_test_cases;
 
@@ -452,7 +455,7 @@ class CommonSizeUnitTestCase extends DrupalUnitTestCase {
 /**
  * Test drupal_explode_tags() and drupal_implode_tags().
  */
-class CommonAutocompleteTagsTestCase extends DrupalUnitTestCase {
+class CommonAutocompleteTagsTestCase extends UnitTestBase {
   var $validTags = array(
     'Drupal' => 'Drupal',
     'Drupal with some spaces' => 'Drupal with some spaces',
@@ -509,7 +512,7 @@ class CommonAutocompleteTagsTestCase extends DrupalUnitTestCase {
 /**
  * Test the Drupal CSS system.
  */
-class CommonCascadingStylesheetsTestCase extends DrupalWebTestCase {
+class CommonCascadingStylesheetsTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Cascading stylesheets',
@@ -743,7 +746,7 @@ class CommonCascadingStylesheetsTestCase extends DrupalWebTestCase {
 /**
  * Test for cleaning HTML identifiers.
  */
-class CommonHTMLIdentifierTestCase extends DrupalUnitTestCase {
+class CommonHTMLIdentifierTestCase extends UnitTestBase {
   public static function getInfo() {
     return array(
       'name' => 'HTML identifiers',
@@ -803,7 +806,7 @@ class CommonHTMLIdentifierTestCase extends DrupalUnitTestCase {
 /**
  * CSS Unit Tests.
  */
-class CommonCascadingStylesheetsUnitTestCase extends DrupalUnitTestCase {
+class CommonCascadingStylesheetsUnitTestCase extends UnitTestBase {
   public static function getInfo() {
     return array(
       'name' => 'CSS Unit Tests',
@@ -855,7 +858,7 @@ class CommonCascadingStylesheetsUnitTestCase extends DrupalUnitTestCase {
 /**
  * Test drupal_http_request().
  */
-class CommonDrupalHTTPRequestTestCase extends DrupalWebTestCase {
+class CommonDrupalHTTPRequestTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Drupal HTTP request',
@@ -987,7 +990,7 @@ class CommonDrupalHTTPRequestTestCase extends DrupalWebTestCase {
 /**
  * Tests drupal_add_region_content() and drupal_get_region_content().
  */
-class CommonRegionContentTestCase extends DrupalWebTestCase {
+class CommonRegionContentTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Region content',
@@ -1032,7 +1035,7 @@ class CommonRegionContentTestCase extends DrupalWebTestCase {
 /**
  * Tests drupal_goto() and hook_drupal_goto_alter().
  */
-class CommonDrupalGotoTestCase extends DrupalWebTestCase {
+class CommonDrupalGotoTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Redirect functionality',
@@ -1101,7 +1104,7 @@ class CommonDrupalGotoTestCase extends DrupalWebTestCase {
 /**
  * Tests for the JavaScript system.
  */
-class CommonJavaScriptTestCase extends DrupalWebTestCase {
+class CommonJavaScriptTestCase extends WebTestBase {
   /**
    * Store configured value for JavaScript preprocessing.
    */
@@ -1558,7 +1561,7 @@ class CommonJavaScriptTestCase extends DrupalWebTestCase {
 /**
  * Tests for drupal_render().
  */
-class CommonDrupalRenderTestCase extends DrupalWebTestCase {
+class CommonDrupalRenderTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'drupal_render()',
@@ -1834,7 +1837,7 @@ class CommonDrupalRenderTestCase extends DrupalWebTestCase {
       . '<hr />' . $this->drupalGetContent()
     );
 
-    // @see DrupalWebTestCase::xpath()
+    // @see Drupal\simpletest\WebTestBase::xpath()
     $xpath = $this->buildXPathQuery($xpath, $xpath_args);
     $element += array('#value' => NULL);
     $this->assertFieldByXPath($xpath, $element['#value'], t('#type @type was properly rendered.', array(
@@ -1877,7 +1880,7 @@ class CommonDrupalRenderTestCase extends DrupalWebTestCase {
 /**
  * Tests URL validation by valid_url().
  */
-class CommonValidUrlUnitTestCase extends DrupalUnitTestCase {
+class CommonValidUrlUnitTestCase extends UnitTestBase {
   public static function getInfo() {
     return array(
       'name' => 'URL validation',
@@ -1985,7 +1988,7 @@ class CommonValidUrlUnitTestCase extends DrupalUnitTestCase {
 /**
  * Tests number step validation by valid_number_step().
  */
-class CommonValidNumberStepUnitTestCase extends DrupalUnitTestCase {
+class CommonValidNumberStepUnitTestCase extends UnitTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Number step validation',
@@ -2052,7 +2055,7 @@ class CommonValidNumberStepUnitTestCase extends DrupalUnitTestCase {
 /**
  * Tests writing of data records with drupal_write_record().
  */
-class CommonDrupalWriteRecordTestCase extends DrupalWebTestCase {
+class CommonDrupalWriteRecordTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Data record write functionality',
@@ -2188,13 +2191,13 @@ class CommonDrupalWriteRecordTestCase extends DrupalWebTestCase {
 /**
  * Tests SimpleTest error and exception collector.
  */
-class CommonSimpleTestErrorCollectorTestCase extends DrupalWebTestCase {
+class CommonSimpleTestErrorCollectorTestCase extends WebTestBase {
 
   /**
    * Errors triggered during the test.
    *
    * Errors are intercepted by the overriden implementation
-   * of DrupalWebTestCase::error below.
+   * of Drupal\simpletest\WebTestBase::error() below.
    *
    * @var Array
    */
@@ -2279,7 +2282,7 @@ class CommonSimpleTestErrorCollectorTestCase extends DrupalWebTestCase {
 /**
  * Tests the drupal_parse_info_file() API function.
  */
-class CommonDrupalParseInfoFileTestCase extends DrupalUnitTestCase {
+class CommonDrupalParseInfoFileTestCase extends UnitTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Parsing .info files',
@@ -2302,7 +2305,7 @@ class CommonDrupalParseInfoFileTestCase extends DrupalUnitTestCase {
 /**
  * Tests scanning system directories in drupal_system_listing().
  */
-class CommonDrupalSystemListingTestCase extends DrupalWebTestCase {
+class CommonDrupalSystemListingTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Drupal system listing',
@@ -2357,7 +2360,7 @@ class CommonDrupalSystemListingTestCase extends DrupalWebTestCase {
 /**
  * Tests the format_date() function.
  */
-class CommonFormatDateTestCase extends DrupalWebTestCase {
+class CommonFormatDateTestCase extends WebTestBase {
 
   /**
    * Arbitrary langcode for a custom language.
@@ -2486,7 +2489,7 @@ class CommonFormatDateTestCase extends DrupalWebTestCase {
 /**
  * Tests the drupal_attributes() functionality.
  */
-class CommonDrupalAttributesUnitTestCase extends DrupalUnitTestCase {
+class CommonDrupalAttributesUnitTestCase extends UnitTestBase {
   public static function getInfo() {
     return array(
       'name' => 'HTML Attributes',
@@ -2526,7 +2529,7 @@ class CommonDrupalAttributesUnitTestCase extends DrupalUnitTestCase {
 /**
  * Tests the various drupal_array_* helper functions.
  */
-class CommonDrupalArrayUnitTest extends DrupalUnitTestCase {
+class CommonDrupalArrayUnitTest extends UnitTestBase {
 
   /**
    * Form array to check.
@@ -2638,7 +2641,7 @@ class CommonDrupalArrayUnitTest extends DrupalUnitTestCase {
 /**
  * Tests the drupal_json_encode() and drupal_json_decode() functions.
  */
-class CommonJSONUnitTestCase extends DrupalUnitTestCase {
+class CommonJSONUnitTestCase extends UnitTestBase {
   public static function getInfo() {
     return array(
       'name' => 'JSON',
@@ -2702,7 +2705,7 @@ class CommonJSONUnitTestCase extends DrupalUnitTestCase {
 /**
  * Basic tests for drupal_add_feed().
  */
-class CommonDrupalAddFeedTestCase extends DrupalWebTestCase {
+class CommonDrupalAddFeedTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'drupal_add_feed() tests',
diff --git a/core/modules/system/tests/database.test b/core/modules/system/tests/database.test
index bec0c1624940a908dcc00f3a404bedc7c59afde4..889a30ced70dc71cb3481658fa129ebca754defa 100644
--- a/core/modules/system/tests/database.test
+++ b/core/modules/system/tests/database.test
@@ -8,6 +8,7 @@ use Drupal\Core\Database\TransactionNoActiveException;
 use Drupal\Core\Database\Query\Merge;
 use Drupal\Core\Database\Query\InvalidMergeQueryException;
 use Drupal\Core\Database\Query\NoFieldsException;
+use Drupal\simpletest\WebTestBase;
 
 /**
  * Dummy class for fetching into a class.
@@ -24,7 +25,7 @@ class FakeRecord { }
  * Because all database tests share the same test data, we can centralize that
  * here.
  */
-class DatabaseTestCase extends DrupalWebTestCase {
+class DatabaseTestCase extends WebTestBase {
   function setUp() {
     $modules = func_get_args();
     if (isset($modules[0]) && is_array($modules[0])) {
@@ -2958,7 +2959,7 @@ class DatabaseSerializeQueryTestCase extends DatabaseTestCase {
 /**
  * Range query tests.
  */
-class DatabaseRangeQueryTestCase extends DrupalWebTestCase {
+class DatabaseRangeQueryTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Range query test',
@@ -2989,7 +2990,7 @@ class DatabaseRangeQueryTestCase extends DrupalWebTestCase {
 /**
  * Temporary query tests.
  */
-class DatabaseTemporaryQueryTestCase extends DrupalWebTestCase {
+class DatabaseTemporaryQueryTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Temporary query test',
@@ -3747,7 +3748,7 @@ class DatabaseTransactionTestCase extends DatabaseTestCase {
 /**
  * Check the sequences API.
  */
-class DatabaseNextIdCase extends DrupalWebTestCase {
+class DatabaseNextIdCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => t('Sequences API'),
@@ -3774,7 +3775,7 @@ class DatabaseNextIdCase extends DrupalWebTestCase {
 /**
  * Tests the empty pseudo-statement class.
  */
-class DatabaseEmptyStatementTestCase extends DrupalWebTestCase {
+class DatabaseEmptyStatementTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => t('Empty statement'),
diff --git a/core/modules/system/tests/error.test b/core/modules/system/tests/error.test
index e05cef43eb566ff5f9741e9e8fac3bc5148715cf..0a3b52262e6b1ec83c5107ec1db215cb381b72d5 100644
--- a/core/modules/system/tests/error.test
+++ b/core/modules/system/tests/error.test
@@ -3,7 +3,10 @@
 /**
  * Tests Drupal error and exception handlers.
  */
-class DrupalErrorHandlerUnitTest extends DrupalWebTestCase {
+
+use Drupal\simpletest\WebTestBase;
+
+class DrupalErrorHandlerUnitTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Drupal error handlers',
diff --git a/core/modules/system/tests/file.test b/core/modules/system/tests/file.test
index ab930090fee2ae2ae70e9b5d63d81dda6ebef19e..78455e49d2d05040e2f66238bc11dd6cc3fedd9f 100644
--- a/core/modules/system/tests/file.test
+++ b/core/modules/system/tests/file.test
@@ -6,6 +6,8 @@
  *  These include FileValidateTest and FileSaveTest.
  */
 
+use Drupal\simpletest\WebTestBase;
+
 /**
  * Helper validator that returns the $errors parameter.
  */
@@ -46,7 +48,7 @@ function file_test_file_scan_callback_reset() {
  * Base class for file tests that adds some additional file specific
  * assertions and helper functions.
  */
-class FileTestCase extends DrupalWebTestCase {
+class FileTestCase extends WebTestBase {
 
   function setUp() {
     $modules = func_get_args();
@@ -374,7 +376,7 @@ class FileSpaceUsedTest extends FileTestCase {
 /**
  *  This will run tests against the file validation functions (file_validate_*).
  */
-class FileValidatorTest extends DrupalWebTestCase {
+class FileValidatorTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'File validator tests',
@@ -2629,7 +2631,7 @@ class FileNameMungingTest extends FileTestCase {
 /**
  * Tests for file_get_mimetype().
  */
-class FileMimeTypeTest extends DrupalWebTestCase {
+class FileMimeTypeTest extends WebTestBase {
   function setUp() {
     parent::setUp('file_test');
   }
@@ -2714,7 +2716,7 @@ class FileMimeTypeTest extends DrupalWebTestCase {
 /**
  * Tests stream wrapper functions.
  */
-class StreamWrapperTest extends DrupalWebTestCase {
+class StreamWrapperTest extends WebTestBase {
 
   protected $scheme = 'dummy';
   protected $classname = 'DrupalDummyStreamWrapper';
diff --git a/core/modules/system/tests/filetransfer.test b/core/modules/system/tests/filetransfer.test
index 8f447d9d3f085db94b63c31b8044d932de07e77a..3f88f4b6f18cd47757057b632d119a7e6ef79e8a 100644
--- a/core/modules/system/tests/filetransfer.test
+++ b/core/modules/system/tests/filetransfer.test
@@ -2,8 +2,9 @@
 
 use Drupal\Core\FileTransfer\FileTransfer;
 use Drupal\Core\FileTransfer\FileTransferException;
+use Drupal\simpletest\WebTestBase;
 
-class FileTranferTest extends DrupalWebTestCase {
+class FileTranferTest extends WebTestBase {
   protected $hostname = 'localhost';
   protected $username = 'drupal';
   protected $password = 'password';
diff --git a/core/modules/system/tests/form.test b/core/modules/system/tests/form.test
index dbb2ff5367cc50adce5fe91349ad096557a95eb4..fe5f922fec06c6a1408a55a710bb8249b2497c28 100644
--- a/core/modules/system/tests/form.test
+++ b/core/modules/system/tests/form.test
@@ -5,7 +5,9 @@
  * Unit tests for the Drupal Form API.
  */
 
-class FormsTestCase extends DrupalWebTestCase {
+use Drupal\simpletest\WebTestBase;
+
+class FormsTestCase extends WebTestBase {
 
   public static function getInfo() {
     return array(
@@ -558,7 +560,7 @@ class FormsTestCase extends DrupalWebTestCase {
 /**
  * Tests building and processing of core form elements.
  */
-class FormElementTestCase extends DrupalWebTestCase {
+class FormElementTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Element processing',
@@ -639,7 +641,7 @@ class FormElementTestCase extends DrupalWebTestCase {
 /**
  * Test form alter hooks.
  */
-class FormAlterTestCase extends DrupalWebTestCase {
+class FormAlterTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Form alter hooks',
@@ -673,7 +675,7 @@ class FormAlterTestCase extends DrupalWebTestCase {
 /**
  * Test form validation handlers.
  */
-class FormValidationTestCase extends DrupalWebTestCase {
+class FormValidationTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Form validation handlers',
@@ -848,7 +850,7 @@ class FormValidationTestCase extends DrupalWebTestCase {
 /**
  * Test form element labels, required markers and associated output.
  */
-class FormsElementsLabelsTestCase extends DrupalWebTestCase {
+class FormsElementsLabelsTestCase extends WebTestBase {
 
   public static function getInfo() {
     return array(
@@ -935,7 +937,7 @@ class FormsElementsLabelsTestCase extends DrupalWebTestCase {
 /**
  * Test the tableselect form element for expected behavior.
  */
-class FormsElementsTableSelectFunctionalTest extends DrupalWebTestCase {
+class FormsElementsTableSelectFunctionalTest extends WebTestBase {
 
   public static function getInfo() {
     return array(
@@ -1161,7 +1163,7 @@ class FormsElementsTableSelectFunctionalTest extends DrupalWebTestCase {
 /**
  * Test the vertical_tabs form element for expected behavior.
  */
-class FormsElementsVerticalTabsFunctionalTest extends DrupalWebTestCase {
+class FormsElementsVerticalTabsFunctionalTest extends WebTestBase {
 
   public static function getInfo() {
     return array(
@@ -1197,7 +1199,7 @@ class FormsElementsVerticalTabsFunctionalTest extends DrupalWebTestCase {
  * when a validation error occurs, it makes sure that changed form element
  * values aren't lost due to a wrong form rebuild.
  */
-class FormsFormStorageTestCase extends DrupalWebTestCase {
+class FormsFormStorageTestCase extends WebTestBase {
 
   public static function getInfo() {
     return array(
@@ -1341,7 +1343,7 @@ class FormsFormStorageTestCase extends DrupalWebTestCase {
 /**
  * Test wrapper form callbacks.
  */
-class FormsFormWrapperTestCase extends DrupalWebTestCase {
+class FormsFormWrapperTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Form wrapper callback',
@@ -1367,7 +1369,7 @@ class FormsFormWrapperTestCase extends DrupalWebTestCase {
 /**
  * Test $form_state clearance.
  */
-class FormStateValuesCleanTestCase extends DrupalWebTestCase {
+class FormStateValuesCleanTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Form state values clearance',
@@ -1415,7 +1417,7 @@ class FormStateValuesCleanTestCase extends DrupalWebTestCase {
 /**
  * Tests $form_state clearance with form elements having buttons.
  */
-class FormStateValuesCleanAdvancedTestCase extends DrupalWebTestCase {
+class FormStateValuesCleanAdvancedTestCase extends WebTestBase {
   /**
    * An image file path for uploading.
    */
@@ -1462,7 +1464,7 @@ class FormStateValuesCleanAdvancedTestCase extends DrupalWebTestCase {
  *
  * @todo Add tests for other aspects of form rebuilding.
  */
-class FormsRebuildTestCase extends DrupalWebTestCase {
+class FormsRebuildTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Form rebuilding',
@@ -1556,7 +1558,7 @@ class FormsRebuildTestCase extends DrupalWebTestCase {
 /**
  * Test the programmatic form submission behavior.
  */
-class FormsProgrammaticTestCase extends DrupalWebTestCase {
+class FormsProgrammaticTestCase extends WebTestBase {
 
   public static function getInfo() {
     return array(
@@ -1645,7 +1647,7 @@ class FormsProgrammaticTestCase extends DrupalWebTestCase {
 /**
  * Test that FAPI correctly determines $form_state['triggering_element'].
  */
-class FormsTriggeringElementTestCase extends DrupalWebTestCase {
+class FormsTriggeringElementTestCase extends WebTestBase {
 
   public static function getInfo() {
     return array(
@@ -1743,7 +1745,7 @@ class FormsTriggeringElementTestCase extends DrupalWebTestCase {
 /**
  * Tests rebuilding of arbitrary forms by altering them.
  */
-class FormsArbitraryRebuildTestCase extends DrupalWebTestCase {
+class FormsArbitraryRebuildTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Rebuild arbitrary forms',
@@ -1809,7 +1811,7 @@ class FormsArbitraryRebuildTestCase extends DrupalWebTestCase {
 /**
  * Tests form API file inclusion.
  */
-class FormsFileInclusionTestCase extends DrupalWebTestCase {
+class FormsFileInclusionTestCase extends WebTestBase {
 
   public static function getInfo() {
     return array(
@@ -1843,7 +1845,7 @@ class FormsFileInclusionTestCase extends DrupalWebTestCase {
 /**
  * Tests checkbox element.
  */
-class FormCheckboxTestCase extends DrupalWebTestCase {
+class FormCheckboxTestCase extends WebTestBase {
 
   public static function getInfo() {
     return array(
@@ -1924,7 +1926,7 @@ class FormCheckboxTestCase extends DrupalWebTestCase {
 /**
  * Tests email element.
  */
-class FormEmailTestCase extends DrupalWebTestCase {
+class FormEmailTestCase extends WebTestBase {
   protected $profile = 'testing';
 
   public static function getInfo() {
@@ -1968,7 +1970,7 @@ class FormEmailTestCase extends DrupalWebTestCase {
 /**
  * Tests url element.
  */
-class FormUrlTestCase extends DrupalWebTestCase {
+class FormUrlTestCase extends WebTestBase {
   protected $profile = 'testing';
 
   public static function getInfo() {
diff --git a/core/modules/system/tests/image.test b/core/modules/system/tests/image.test
index deead570a084e4aa9f9350bd38a4c7ce7104ff33..ab9eaa4e8e10d8e49157fb9e2fd862398909b0e3 100644
--- a/core/modules/system/tests/image.test
+++ b/core/modules/system/tests/image.test
@@ -5,10 +5,12 @@
  * Tests for core image handling API.
  */
 
+use Drupal\simpletest\WebTestBase;
+
 /**
  * Base class for image manipulation testing.
  */
-class ImageToolkitTestCase extends DrupalWebTestCase {
+class ImageToolkitTestCase extends WebTestBase {
   protected $toolkit;
   protected $file;
   protected $image;
@@ -194,7 +196,7 @@ class ImageToolkitUnitTest extends ImageToolkitTestCase {
 /**
  * Test the core GD image manipulation functions.
  */
-class ImageToolkitGdTestCase extends DrupalWebTestCase {
+class ImageToolkitGdTestCase extends WebTestBase {
   // Colors that are used in testing.
   protected $black       = array(0, 0, 0, 0);
   protected $red         = array(255, 0, 0, 0);
diff --git a/core/modules/system/tests/installer.test b/core/modules/system/tests/installer.test
index 82e9957c51bcf5a118f792d84297c01cd3bea32e..f076ba9a2ec6601036b21248985c708a641ad331 100644
--- a/core/modules/system/tests/installer.test
+++ b/core/modules/system/tests/installer.test
@@ -5,10 +5,12 @@
  * Tests for the installer.
  */
 
+use Drupal\simpletest\WebTestBase;
+
 /**
  * Tests installer language detection.
  */
-class InstallerLanguageTestCase extends DrupalWebTestCase {
+class InstallerLanguageTestCase extends WebTestBase {
 
   public static function getInfo() {
     return array(
diff --git a/core/modules/system/tests/lock.test b/core/modules/system/tests/lock.test
index c92846be3a7dabd2c1b6391201a7bced87239684..65dcf806bcd7291f2316937428edc32cabbdd3e2 100644
--- a/core/modules/system/tests/lock.test
+++ b/core/modules/system/tests/lock.test
@@ -3,7 +3,10 @@
 /**
  * Tests for the lock system.
  */
-class LockFunctionalTest extends DrupalWebTestCase {
+
+use Drupal\simpletest\WebTestBase;
+
+class LockFunctionalTest extends WebTestBase {
 
   public static function getInfo() {
     return array(
diff --git a/core/modules/system/tests/mail.test b/core/modules/system/tests/mail.test
index 5d33102b81d185c87e4d4b10c18145715f8902f8..38c6dc8c0af2d94d654a8daff89f80ba2505d661 100644
--- a/core/modules/system/tests/mail.test
+++ b/core/modules/system/tests/mail.test
@@ -6,11 +6,12 @@
  */
 
 use Drupal\Core\Mail\MailInterface;
+use Drupal\simpletest\WebTestBase;
 
 /**
  * Defines a mail class used for testing.
  */
-class MailTestCase extends DrupalWebTestCase implements MailInterface {
+class MailTestCase extends WebTestBase implements MailInterface {
   /**
    * The most recent message that was sent through the test case.
    *
@@ -91,7 +92,7 @@ class MailTestCase extends DrupalWebTestCase implements MailInterface {
 /**
  * Unit tests for drupal_html_to_text().
  */
-class DrupalHtmlToTextTestCase extends DrupalWebTestCase {
+class DrupalHtmlToTextTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name'  => 'HTML to text conversion',
diff --git a/core/modules/system/tests/menu.test b/core/modules/system/tests/menu.test
index 791cd5c8b5509e83df8b0b42c555d372a91b7dd4..dbd94a11a90298afb85a6f49b2fa3b22b56a77fb 100644
--- a/core/modules/system/tests/menu.test
+++ b/core/modules/system/tests/menu.test
@@ -5,7 +5,10 @@
  * Provides SimpleTests for menu.inc.
  */
 
-class MenuWebTestCase extends DrupalWebTestCase {
+use Drupal\simpletest\WebTestBase;
+use Drupal\simpletest\UnitTestBase;
+
+class MenuWebTestCase extends WebTestBase {
   function setUp() {
     $modules = func_get_args();
     if (isset($modules[0]) && is_array($modules[0])) {
@@ -18,13 +21,14 @@ class MenuWebTestCase extends DrupalWebTestCase {
    * Assert that a given path shows certain breadcrumb links.
    *
    * @param string $goto
-   *   (optional) A system path to pass to DrupalWebTestCase::drupalGet().
+   *   (optional) A system path to pass to
+   *   Drupal\simpletest\WebTestBase::drupalGet().
    * @param array $trail
    *   An associative array whose keys are expected breadcrumb link paths and
    *   whose values are expected breadcrumb link texts (not sanitized).
    * @param string $page_title
    *   (optional) A page title to additionally assert via
-   *   DrupalWebTestCase::assertTitle(). Without site name suffix.
+   *   Drupal\simpletest\WebTestBase::assertTitle(). Without site name suffix.
    * @param array $tree
    *   (optional) An associative array whose keys are link paths and whose
    *   values are link titles (not sanitized) of an expected active trail in a
@@ -121,7 +125,7 @@ class MenuWebTestCase extends DrupalWebTestCase {
   }
 }
 
-class MenuRouterTestCase extends DrupalWebTestCase {
+class MenuRouterTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Menu router',
@@ -663,7 +667,7 @@ class MenuRouterTestCase extends DrupalWebTestCase {
 /**
  * Tests for menu links.
  */
-class MenuLinksUnitTestCase extends DrupalWebTestCase {
+class MenuLinksUnitTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Menu links',
@@ -879,7 +883,7 @@ class MenuLinksUnitTestCase extends DrupalWebTestCase {
 /**
  * Tests rebuilding the menu by setting 'menu_rebuild_needed.'
  */
-class MenuRebuildTestCase extends DrupalWebTestCase {
+class MenuRebuildTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Menu rebuild test',
@@ -917,7 +921,7 @@ class MenuRebuildTestCase extends DrupalWebTestCase {
 /**
  * Menu tree data related tests.
  */
-class MenuTreeDataTestCase extends DrupalUnitTestCase {
+class MenuTreeDataTestCase extends UnitTestBase {
   /**
    * Dummy link structure acceptable for menu_tree_data().
    */
@@ -972,7 +976,7 @@ class MenuTreeDataTestCase extends DrupalUnitTestCase {
 /**
  * Menu tree output related tests.
  */
-class MenuTreeOutputTestCase extends DrupalWebTestCase {
+class MenuTreeOutputTestCase extends WebTestBase {
   /**
    * Dummy link structure acceptable for menu_tree_output().
    */
diff --git a/core/modules/system/tests/module.test b/core/modules/system/tests/module.test
index 564cc4138a1cc636f0161795b896957599b185b3..761992da44bdd1457929ebf05fcdc04d40879275 100644
--- a/core/modules/system/tests/module.test
+++ b/core/modules/system/tests/module.test
@@ -5,10 +5,12 @@
  * Tests for the module API.
  */
 
+use Drupal\simpletest\WebTestBase;
+
 /**
  * Unit tests for the module API.
  */
-class ModuleUnitTest extends DrupalWebTestCase {
+class ModuleUnitTest extends WebTestBase {
   // Requires Standard profile modules/dependencies.
   protected $profile = 'standard';
 
@@ -269,7 +271,7 @@ class ModuleUnitTest extends DrupalWebTestCase {
 /**
  * Tests class loading.
  */
-class ModuleClassLoaderTestCase extends DrupalWebTestCase {
+class ModuleClassLoaderTestCase extends WebTestBase {
   protected $profile = 'testing';
 
   public static function getInfo() {
@@ -307,7 +309,7 @@ class ModuleClassLoaderTestCase extends DrupalWebTestCase {
 /**
  * Unit tests for module installation.
  */
-class ModuleInstallTestCase extends DrupalWebTestCase {
+class ModuleInstallTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Module installation',
@@ -344,7 +346,7 @@ class ModuleInstallTestCase extends DrupalWebTestCase {
 /**
  * Unit tests for module uninstallation and related hooks.
  */
-class ModuleUninstallTestCase extends DrupalWebTestCase {
+class ModuleUninstallTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Module uninstallation',
diff --git a/core/modules/system/tests/pager.test b/core/modules/system/tests/pager.test
index 6fdeec5bf48195db40c4c30fe615fd458d6389fb..7d091f86147012342735c07fed18e78ff123b9e2 100644
--- a/core/modules/system/tests/pager.test
+++ b/core/modules/system/tests/pager.test
@@ -5,10 +5,12 @@
  * Tests for pager functionality.
  */
 
+use Drupal\simpletest\WebTestBase;
+
 /**
  * Tests pager functionality.
  */
-class PagerFunctionalWebTestCase extends DrupalWebTestCase {
+class PagerFunctionalWebTestCase extends WebTestBase {
   protected $profile = 'testing';
 
   public static function getInfo() {
diff --git a/core/modules/system/tests/password.test b/core/modules/system/tests/password.test
index 2797786d9890c19c1d5ae33c85b015c35136b5ca..25878222ce258e082670af009dffdf61de2306c4 100644
--- a/core/modules/system/tests/password.test
+++ b/core/modules/system/tests/password.test
@@ -5,10 +5,12 @@
  * Provides unit tests for password.inc.
  */
 
+use Drupal\simpletest\WebTestBase;
+
 /**
  * Unit tests for password hashing API.
  */
-class PasswordHashingTest extends DrupalWebTestCase {
+class PasswordHashingTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Password hashing',
diff --git a/core/modules/system/tests/path.test b/core/modules/system/tests/path.test
index f02a9b4b91a503b811ac519fca531eb1b4cc797e..271cd911c2430b0b0bd3826ee028d6f0a948a883 100644
--- a/core/modules/system/tests/path.test
+++ b/core/modules/system/tests/path.test
@@ -5,12 +5,14 @@
  * Tests for path.inc.
  */
 
+use Drupal\simpletest\WebTestBase;
+
 /**
  * Unit tests for the drupal_match_path() function in path.inc.
  *
  * @see drupal_match_path().
  */
-class DrupalMatchPathTestCase extends DrupalWebTestCase {
+class DrupalMatchPathTestCase extends WebTestBase {
   protected $front;
 
   public static function getInfo() {
@@ -129,7 +131,7 @@ class DrupalMatchPathTestCase extends DrupalWebTestCase {
 /**
  * Tests hook_url_alter functions.
  */
-class UrlAlterFunctionalTest extends DrupalWebTestCase {
+class UrlAlterFunctionalTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => t('URL altering'),
@@ -247,7 +249,7 @@ class UrlAlterFunctionalTest extends DrupalWebTestCase {
 /**
  * Unit test for drupal_lookup_path().
  */
-class PathLookupTest extends DrupalWebTestCase {
+class PathLookupTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => t('Path lookup'),
@@ -337,7 +339,7 @@ class PathLookupTest extends DrupalWebTestCase {
 /**
  * Tests the path_save() function.
  */
-class PathSaveTest extends DrupalWebTestCase {
+class PathSaveTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => t('Path save'),
diff --git a/core/modules/system/tests/queue.test b/core/modules/system/tests/queue.test
index e8f4c2c42b1d508c7680d7fbe96d902691c3aec2..1c04677873e9b68202b05ced435143e27f4aa5da 100644
--- a/core/modules/system/tests/queue.test
+++ b/core/modules/system/tests/queue.test
@@ -2,11 +2,12 @@
 
 use Drupal\Core\Queue\Memory;
 use Drupal\Core\Queue\System;
+use Drupal\simpletest\WebTestBase;
 
 /**
  * Tests the basic queue functionality.
  */
-class QueueTestCase extends DrupalWebTestCase {
+class QueueTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Queue functionality',
diff --git a/core/modules/system/tests/registry.test b/core/modules/system/tests/registry.test
index bcd8d4e0dec5f1178e85447fb1b3c8d5fd085c22..7ad832681624511c910fedf924e0f860554a6fdd 100644
--- a/core/modules/system/tests/registry.test
+++ b/core/modules/system/tests/registry.test
@@ -1,6 +1,8 @@
 <?php
 
-class RegistryParseFileTestCase extends DrupalWebTestCase {
+use Drupal\simpletest\WebTestBase;
+
+class RegistryParseFileTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Registry parse file test',
@@ -45,7 +47,7 @@ CONTENTS;
 
 }
 
-class RegistryParseFilesTestCase extends DrupalWebTestCase {
+class RegistryParseFilesTestCase extends WebTestBase {
   protected $fileTypes = array('new', 'existing_changed');
 
   public static function getInfo() {
diff --git a/core/modules/system/tests/schema.test b/core/modules/system/tests/schema.test
index 5a105678fc7c9845032b994e787ef83138dbcb57..f2e94aca9f9234f84ebcd5e829c9ccc55f1a0e0a 100644
--- a/core/modules/system/tests/schema.test
+++ b/core/modules/system/tests/schema.test
@@ -1,6 +1,7 @@
 <?php
 
 use Drupal\Core\Database\Database;
+use Drupal\simpletest\WebTestBase;
 
 /**
  * @file
@@ -10,7 +11,7 @@ use Drupal\Core\Database\Database;
 /**
  * Unit tests for the Schema API.
  */
-class SchemaTestCase extends DrupalWebTestCase {
+class SchemaTestCase extends WebTestBase {
   /**
    * A global counter for table and field creation.
    */
diff --git a/core/modules/system/tests/session.test b/core/modules/system/tests/session.test
index ff0afb85fdafc646104a231aac46db8dff5ad1e1..0c9a172347814cd194094186c5d0b2cff8cf2104 100644
--- a/core/modules/system/tests/session.test
+++ b/core/modules/system/tests/session.test
@@ -5,7 +5,9 @@
  * Provides SimpleTests for core session handling functionality.
  */
 
-class SessionTestCase extends DrupalWebTestCase {
+use Drupal\simpletest\WebTestBase;
+
+class SessionTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Session tests',
@@ -293,7 +295,7 @@ class SessionTestCase extends DrupalWebTestCase {
 /**
  * Ensure that when running under https two session cookies are generated.
  */
-class SessionHttpsTestCase extends DrupalWebTestCase {
+class SessionHttpsTestCase extends WebTestBase {
 
   public static function getInfo() {
     return array(
diff --git a/core/modules/system/tests/symfony.test b/core/modules/system/tests/symfony.test
index 8a7ecb967a69e408a645fbd5c3399bbc73652911..0719c7c4521f58820ddfb0e2c2c8e74575ad6032 100644
--- a/core/modules/system/tests/symfony.test
+++ b/core/modules/system/tests/symfony.test
@@ -5,10 +5,12 @@
  * Tests for Symfony2-related functionality.
  */
 
+use Drupal\simpletest\UnitTestBase;
+
 /**
  * Tests related to Symfony class loading.
  */
-class SymfonyClassLoaderTestCase extends DrupalUnitTestCase {
+class SymfonyClassLoaderTestCase extends UnitTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Class loader',
diff --git a/core/modules/system/tests/tablesort.test b/core/modules/system/tests/tablesort.test
index aaea5058b7af1607fb95baeff5000e896303e372..1dc35fee6577bc1da94d367bf6b6aad2f359393d 100644
--- a/core/modules/system/tests/tablesort.test
+++ b/core/modules/system/tests/tablesort.test
@@ -5,10 +5,12 @@
  * Various tablesort tests.
  */
 
+use Drupal\simpletest\UnitTestBase;
+
 /**
  * Test unicode handling features implemented in unicode.inc.
  */
-class TableSortTest extends DrupalUnitTestCase {
+class TableSortTest extends UnitTestBase {
 
   /**
    * Storage for initial value of $_GET.
diff --git a/core/modules/system/tests/theme.test b/core/modules/system/tests/theme.test
index 025ae8d7d882501aec39d6f0fdaa10fcbee948b1..d7c6fb2f5bbed8d68a4b725232063f61765e9058 100644
--- a/core/modules/system/tests/theme.test
+++ b/core/modules/system/tests/theme.test
@@ -5,10 +5,13 @@
  * Tests for the theme API.
  */
 
+use Drupal\simpletest\WebTestBase;
+use Drupal\simpletest\UnitTestBase;
+
 /**
  * Unit tests for the Theme API.
  */
-class ThemeUnitTest extends DrupalWebTestCase {
+class ThemeUnitTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Theme API',
@@ -172,7 +175,7 @@ class ThemeUnitTest extends DrupalWebTestCase {
 /**
  * Unit tests for theme_table().
  */
-class ThemeTableUnitTest extends DrupalWebTestCase {
+class ThemeTableUnitTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Theme Table',
@@ -232,7 +235,7 @@ class ThemeTableUnitTest extends DrupalWebTestCase {
 /**
  * Tests for common theme functions.
  */
-class ThemeFunctionsTestCase extends DrupalWebTestCase {
+class ThemeFunctionsTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Theme functions',
@@ -490,7 +493,7 @@ class ThemeFunctionsTestCase extends DrupalWebTestCase {
 /**
  * Functional test for initialization of the theme system in hook_init().
  */
-class ThemeHookInitUnitTest extends DrupalWebTestCase {
+class ThemeHookInitUnitTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Theme initialization in hook_init()',
@@ -519,7 +522,7 @@ class ThemeHookInitUnitTest extends DrupalWebTestCase {
 /**
  * Tests autocompletion not loading registry.
  */
-class ThemeFastTestCase extends DrupalWebTestCase {
+class ThemeFastTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Theme fast initialization',
@@ -546,7 +549,7 @@ class ThemeFastTestCase extends DrupalWebTestCase {
 /**
  * Unit tests for theme_html_tag().
  */
-class ThemeHtmlTag extends DrupalUnitTestCase {
+class ThemeHtmlTag extends UnitTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Theme HTML Tag',
@@ -572,7 +575,7 @@ class ThemeHtmlTag extends DrupalUnitTestCase {
 /**
  * Functional test for attributes of html.tpl.php.
  */
-class ThemeHtmlTplPhpAttributesTestCase extends DrupalWebTestCase {
+class ThemeHtmlTplPhpAttributesTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'html.tpl.php html and body attributes',
@@ -600,7 +603,7 @@ class ThemeHtmlTplPhpAttributesTestCase extends DrupalWebTestCase {
 /**
  * Tests for the ThemeRegistry class.
  */
-class ThemeRegistryTestCase extends DrupalWebTestCase {
+class ThemeRegistryTestCase extends WebTestBase {
   protected $profile = 'testing';
   public static function getInfo() {
     return array(
@@ -651,7 +654,7 @@ class ThemeRegistryTestCase extends DrupalWebTestCase {
 /**
  * Tests for theme_datetime().
  */
-class ThemeDatetime extends DrupalWebTestCase {
+class ThemeDatetime extends WebTestBase {
   protected $profile = 'testing';
 
   public static function getInfo() {
diff --git a/core/modules/system/tests/unicode.test b/core/modules/system/tests/unicode.test
index c50a43775d17128c07e2bd1f076ce3470a8ee3c6..e87ea54a8ac6b07c0c64be7915a93e6a1bf2c0b6 100644
--- a/core/modules/system/tests/unicode.test
+++ b/core/modules/system/tests/unicode.test
@@ -5,10 +5,12 @@
  * Various unicode handling tests.
  */
 
+use Drupal\simpletest\UnitTestBase;
+
 /**
  * Test unicode handling features implemented in unicode.inc.
  */
-class UnicodeUnitTest extends DrupalUnitTestCase {
+class UnicodeUnitTest extends UnitTestBase {
 
   /**
    * Whether to run the extended version of the tests (including non latin1 characters).
diff --git a/core/modules/system/tests/update.test b/core/modules/system/tests/update.test
index abbab47391d9edb318538a7a9edf0744432e4c61..72bc61a383bd04523f5cb2fe919d74249af30b89 100644
--- a/core/modules/system/tests/update.test
+++ b/core/modules/system/tests/update.test
@@ -5,10 +5,12 @@
  * Tests for the update system.
  */
 
+use Drupal\simpletest\WebTestBase;
+
 /**
  * Tests for the update dependency ordering system.
  */
-class UpdateDependencyOrderingTestCase extends DrupalWebTestCase {
+class UpdateDependencyOrderingTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Update dependency ordering',
@@ -58,7 +60,7 @@ class UpdateDependencyOrderingTestCase extends DrupalWebTestCase {
 /**
  * Tests for missing update dependencies.
  */
-class UpdateDependencyMissingTestCase extends DrupalWebTestCase {
+class UpdateDependencyMissingTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Missing update dependencies',
@@ -88,7 +90,7 @@ class UpdateDependencyMissingTestCase extends DrupalWebTestCase {
 /**
  * Tests for the invocation of hook_update_dependencies().
  */
-class UpdateDependencyHookInvocationTestCase extends DrupalWebTestCase {
+class UpdateDependencyHookInvocationTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Update dependency hook invocation',
diff --git a/core/modules/system/tests/upgrade/upgrade.test b/core/modules/system/tests/upgrade/upgrade.test
index aa1ad6f509e2bde4816f78af2fe83c6df1da6feb..2f942fa5c3cf79a19f12764d13fb01726a704547 100644
--- a/core/modules/system/tests/upgrade/upgrade.test
+++ b/core/modules/system/tests/upgrade/upgrade.test
@@ -1,11 +1,12 @@
 <?php
 
 use Drupal\Core\Database\Database;
+use Drupal\simpletest\WebTestBase;
 
 /**
  * Perform end-to-end tests of the upgrade path.
  */
-abstract class UpgradePathTestCase extends DrupalWebTestCase {
+abstract class UpgradePathTestCase extends WebTestBase {
 
   /**
    * The file path(s) to the dumped database(s) to load into the child site.
@@ -62,11 +63,11 @@ abstract class UpgradePathTestCase extends DrupalWebTestCase {
   }
 
   /**
-   * Overrides DrupalWebTestCase::setUp() for upgrade testing.
+   * Overrides Drupal\simpletest\WebTestBase::setUp() for upgrade testing.
    *
-   * @see DrupalWebTestCase::prepareDatabasePrefix()
-   * @see DrupalWebTestCase::changeDatabasePrefix()
-   * @see DrupalWebTestCase::prepareEnvironment()
+   * @see Drupal\simpletest\WebTestBase::prepareDatabasePrefix()
+   * @see Drupal\simpletest\WebTestBase::changeDatabasePrefix()
+   * @see Drupal\simpletest\WebTestBase::prepareEnvironment()
    */
   protected function setUp() {
     global $user, $language_interface, $conf;
diff --git a/core/modules/system/tests/uuid.test b/core/modules/system/tests/uuid.test
index 0e1d679150207e67d2f9e8376b0bbddd669271cb..af7bcc7a248c1d2b73d1b9dbe246913198bb8dd4 100644
--- a/core/modules/system/tests/uuid.test
+++ b/core/modules/system/tests/uuid.test
@@ -1,11 +1,12 @@
 <?php
 
 use Drupal\Component\Uuid\Uuid;
+use Drupal\simpletest\UnitTestBase;
 
 /**
  * Tests the Drupal\Component\Uuid\Uuid class.
  */
-class UuidUnitTestCase extends DrupalUnitTestCase {
+class UuidUnitTestCase extends UnitTestBase {
 
   /**
    * The UUID object to be used for generating UUIDs.
diff --git a/core/modules/system/tests/xmlrpc.test b/core/modules/system/tests/xmlrpc.test
index 4442211b115e64cf010c7f6dcbb4d76e157804ce..b5c07ca87d341eb0917aa432f6383dd76fe9aeab 100644
--- a/core/modules/system/tests/xmlrpc.test
+++ b/core/modules/system/tests/xmlrpc.test
@@ -1,9 +1,11 @@
 <?php
 
+use Drupal\simpletest\WebTestBase;
+
 /**
  * Perform basic XML-RPC tests that do not require addition callbacks.
  */
-class XMLRPCBasicTestCase extends DrupalWebTestCase {
+class XMLRPCBasicTestCase extends WebTestBase {
 
   public static function getInfo() {
     return array(
@@ -84,7 +86,7 @@ class XMLRPCBasicTestCase extends DrupalWebTestCase {
   }
 }
 
-class XMLRPCValidator1IncTestCase extends DrupalWebTestCase {
+class XMLRPCValidator1IncTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'XML-RPC validator',
@@ -199,7 +201,7 @@ class XMLRPCValidator1IncTestCase extends DrupalWebTestCase {
   }
 }
 
-class XMLRPCMessagesTestCase extends DrupalWebTestCase {
+class XMLRPCMessagesTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name'  => 'XML-RPC message and alteration',
diff --git a/core/modules/taxonomy/taxonomy.test b/core/modules/taxonomy/taxonomy.test
index 428c8abfe93de0d56d8858301279547f1f5a3035..a6558117b3dfb6b2f75b69371b27fceeb101c243 100644
--- a/core/modules/taxonomy/taxonomy.test
+++ b/core/modules/taxonomy/taxonomy.test
@@ -6,11 +6,12 @@
  */
 
 use Drupal\field\FieldValidationException;
+use Drupal\simpletest\WebTestBase;
 
 /**
  * Provides common helper methods for Taxonomy module tests.
  */
-class TaxonomyWebTestCase extends DrupalWebTestCase {
+class TaxonomyWebTestCase extends WebTestBase {
 
   function setUp() {
     $modules = func_get_args();
diff --git a/core/modules/tracker/lib/Drupal/tracker/Tests/TrackerTest.php b/core/modules/tracker/lib/Drupal/tracker/Tests/TrackerTest.php
index 5e689ff17226eec4568a185e92201379e6fc4177..2706d3bda62dce660a5157901a2f699cb1cc9da6 100644
--- a/core/modules/tracker/lib/Drupal/tracker/Tests/TrackerTest.php
+++ b/core/modules/tracker/lib/Drupal/tracker/Tests/TrackerTest.php
@@ -7,12 +7,12 @@
 
 namespace Drupal\tracker\Tests;
 
-use DrupalWebTestCase;
+use Drupal\simpletest\WebTestBase;
 
 /**
  * Defines a base class for testing tracker.module.
  */
-class TrackerTest extends DrupalWebTestCase {
+class TrackerTest extends WebTestBase {
 
   /**
    * The main user for testing.
diff --git a/core/modules/translation/translation.test b/core/modules/translation/translation.test
index c9b3dcb3327a828a2bd1b55d40910f4d812393fd..1a0f0a017ddb349bbffcfb2dbf3bd585e972982c 100644
--- a/core/modules/translation/translation.test
+++ b/core/modules/translation/translation.test
@@ -6,11 +6,12 @@
  */
 
 use Drupal\node\Node;
+use Drupal\simpletest\WebTestBase;
 
 /**
  * Functional tests for the Translation module.
  */
-class TranslationTestCase extends DrupalWebTestCase {
+class TranslationTestCase extends WebTestBase {
   protected $profile = 'standard';
 
   protected $book;
diff --git a/core/modules/update/update.test b/core/modules/update/update.test
index e36fa2458329d65203bf774aba099e50606332fa..0e100576ac4de01493e00433be1684d11a968218 100644
--- a/core/modules/update/update.test
+++ b/core/modules/update/update.test
@@ -19,10 +19,13 @@
  * initial state and availability scenario.
  */
 
+use Drupal\simpletest\WebTestBase;
+use Drupal\simpletest\UnitTestBase;
+
 /**
  * Base class to define some shared functions used by all update tests.
  */
-class UpdateTestHelper extends DrupalWebTestCase {
+class UpdateTestHelper extends WebTestBase {
   /**
    * Refresh the update status based on the desired available update scenario.
    *
@@ -725,7 +728,7 @@ class UpdateTestUploadCase extends UpdateTestHelper {
 
 }
 
-class UpdateCoreUnitTestCase extends DrupalUnitTestCase {
+class UpdateCoreUnitTestCase extends UnitTestBase {
 
   public static function getInfo() {
     return array(
diff --git a/core/modules/user/user.pages.inc b/core/modules/user/user.pages.inc
index 438fedbb398ba8423dfdc0bc0ff3c8d4e25362b4..becb76339fed91136da736460d8ea01fdff4c37e 100644
--- a/core/modules/user/user.pages.inc
+++ b/core/modules/user/user.pages.inc
@@ -67,7 +67,7 @@ function user_pass_validate($form, &$form_state) {
     form_set_value(array('#parents' => array('account')), $account, $form_state);
   }
   else {
-    form_set_error('name', t('Sorry, %name is not recognized as a user name or an e-mail address.', array('%name' => $name)));
+    form_set_error('name', t('Sorry, %name is not recognized as a username or an e-mail address.', array('%name' => $name)));
   }
 }
 
diff --git a/core/modules/user/user.test b/core/modules/user/user.test
index 0ce68708e22d2dd82b2e4e88b0d5a4a8b55b19b7..7671eba9a0c7fa2347b992e42682845229b78a57 100644
--- a/core/modules/user/user.test
+++ b/core/modules/user/user.test
@@ -5,7 +5,9 @@
  * Tests for user.module.
  */
 
-class UserRegistrationTestCase extends DrupalWebTestCase {
+use Drupal\simpletest\WebTestBase;
+
+class UserRegistrationTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'User registration',
@@ -258,7 +260,7 @@ class UserRegistrationTestCase extends DrupalWebTestCase {
   }
 }
 
-class UserValidationTestCase extends DrupalWebTestCase {
+class UserValidationTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Username/e-mail validation',
@@ -298,7 +300,7 @@ class UserValidationTestCase extends DrupalWebTestCase {
 /**
  * Functional tests for user logins, including rate limiting of login attempts.
  */
-class UserLoginTestCase extends DrupalWebTestCase {
+class UserLoginTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'User login',
@@ -441,7 +443,7 @@ class UserLoginTestCase extends DrupalWebTestCase {
 /**
  * Tests resetting a user password.
  */
-class UserPasswordResetTestCase extends DrupalWebTestCase {
+class UserPasswordResetTestCase extends WebTestBase {
   protected $profile = 'standard';
 
   public static function getInfo() {
@@ -493,7 +495,7 @@ class UserPasswordResetTestCase extends DrupalWebTestCase {
 /**
  * Test cancelling a user.
  */
-class UserCancelTestCase extends DrupalWebTestCase {
+class UserCancelTestCase extends WebTestBase {
   protected $profile = 'standard';
 
   public static function getInfo() {
@@ -919,7 +921,7 @@ class UserCancelTestCase extends DrupalWebTestCase {
   }
 }
 
-class UserPictureTestCase extends DrupalWebTestCase {
+class UserPictureTestCase extends WebTestBase {
   protected $user;
   protected $_directory_test;
 
@@ -1228,7 +1230,7 @@ class UserPictureTestCase extends DrupalWebTestCase {
 }
 
 
-class UserPermissionsTestCase extends DrupalWebTestCase {
+class UserPermissionsTestCase extends WebTestBase {
   protected $admin_user;
   protected $rid;
 
@@ -1326,7 +1328,7 @@ class UserPermissionsTestCase extends DrupalWebTestCase {
   }
 }
 
-class UserAdminTestCase extends DrupalWebTestCase {
+class UserAdminTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'User administration',
@@ -1415,7 +1417,7 @@ class UserAdminTestCase extends DrupalWebTestCase {
 /**
  * Tests for user-configurable time zones.
  */
-class UserTimeZoneFunctionalTest extends DrupalWebTestCase {
+class UserTimeZoneFunctionalTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'User time zones',
@@ -1475,7 +1477,7 @@ class UserTimeZoneFunctionalTest extends DrupalWebTestCase {
 /**
  * Test user autocompletion.
  */
-class UserAutocompleteTestCase extends DrupalWebTestCase {
+class UserAutocompleteTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'User autocompletion',
@@ -1516,7 +1518,7 @@ class UserAutocompleteTestCase extends DrupalWebTestCase {
 /**
  * Test user-links in secondary menu.
  */
-class UserAccountLinksUnitTests extends DrupalWebTestCase {
+class UserAccountLinksUnitTests extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'User account links',
@@ -1565,7 +1567,7 @@ class UserAccountLinksUnitTests extends DrupalWebTestCase {
 /**
  * Test user blocks.
  */
-class UserBlocksUnitTests extends DrupalWebTestCase {
+class UserBlocksUnitTests extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'User blocks',
@@ -1680,7 +1682,7 @@ class UserBlocksUnitTests extends DrupalWebTestCase {
 /**
  * Tests user_save() behavior.
  */
-class UserSaveTestCase extends DrupalWebTestCase {
+class UserSaveTestCase extends WebTestBase {
 
   public static function getInfo() {
     return array(
@@ -1722,7 +1724,7 @@ class UserSaveTestCase extends DrupalWebTestCase {
 /**
  * Test the create user administration page.
  */
-class UserCreateTestCase extends DrupalWebTestCase {
+class UserCreateTestCase extends WebTestBase {
 
   public static function getInfo() {
     return array(
@@ -1768,7 +1770,7 @@ class UserCreateTestCase extends DrupalWebTestCase {
 /**
  * Tests the user edit form.
  */
-class UserEditTestCase extends DrupalWebTestCase {
+class UserEditTestCase extends WebTestBase {
 
   public static function getInfo() {
     return array(
@@ -1860,7 +1862,7 @@ class UserEditTestCase extends DrupalWebTestCase {
 /**
  * Test case for user signatures.
  */
-class UserSignatureTestCase extends DrupalWebTestCase {
+class UserSignatureTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'User signatures',
@@ -1964,7 +1966,7 @@ class UserSignatureTestCase extends DrupalWebTestCase {
 /*
  * Test that a user, having editing their own account, can still log in.
  */
-class UserEditedOwnAccountTestCase extends DrupalWebTestCase {
+class UserEditedOwnAccountTestCase extends WebTestBase {
 
   public static function getInfo() {
     return array(
@@ -2000,7 +2002,7 @@ class UserEditedOwnAccountTestCase extends DrupalWebTestCase {
 /**
  * Test case to test adding, editing and deleting roles.
  */
-class UserRoleAdminTestCase extends DrupalWebTestCase {
+class UserRoleAdminTestCase extends WebTestBase {
 
   public static function getInfo() {
     return array(
@@ -2085,7 +2087,7 @@ class UserRoleAdminTestCase extends DrupalWebTestCase {
 /**
  * Test user token replacement in strings.
  */
-class UserTokenReplaceTestCase extends DrupalWebTestCase {
+class UserTokenReplaceTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'User token replacement',
@@ -2150,7 +2152,7 @@ class UserTokenReplaceTestCase extends DrupalWebTestCase {
 /**
  * Test user search.
  */
-class UserUserSearchTestCase extends DrupalWebTestCase {
+class UserUserSearchTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'User search',
@@ -2186,7 +2188,7 @@ class UserUserSearchTestCase extends DrupalWebTestCase {
 /**
  * Test role assignment.
  */
-class UserRolesAssignmentTestCase extends DrupalWebTestCase {
+class UserRolesAssignmentTestCase extends WebTestBase {
   protected $admin_user;
 
   public static function getInfo() {
@@ -2276,7 +2278,7 @@ class UserRolesAssignmentTestCase extends DrupalWebTestCase {
 /**
  * Unit test for authmap assignment.
  */
-class UserAuthmapAssignmentTestCase extends DrupalWebTestCase {
+class UserAuthmapAssignmentTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => t('Authmap assignment'),
@@ -2335,7 +2337,7 @@ class UserAuthmapAssignmentTestCase extends DrupalWebTestCase {
 /**
  * Tests user_validate_current_pass on a custom form.
  */
-class UserValidateCurrentPassCustomForm extends DrupalWebTestCase {
+class UserValidateCurrentPassCustomForm extends WebTestBase {
 
   public static function getInfo() {
     return array(
@@ -2380,7 +2382,7 @@ class UserValidateCurrentPassCustomForm extends DrupalWebTestCase {
 /**
  * Test user entity callbacks.
  */
-class UserEntityCallbacksTestCase extends DrupalWebTestCase {
+class UserEntityCallbacksTestCase extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'User entity callback tests',
@@ -2420,7 +2422,7 @@ class UserEntityCallbacksTestCase extends DrupalWebTestCase {
 /**
  * Functional tests for a user's ability to change their default language.
  */
-class UserLanguageFunctionalTest extends DrupalWebTestCase {
+class UserLanguageFunctionalTest extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'User language settings',
@@ -2485,7 +2487,7 @@ class UserLanguageFunctionalTest extends DrupalWebTestCase {
 /**
  * Functional test for language handling during user creation.
  */
-class UserLanguageCreationTest extends DrupalWebTestCase {
+class UserLanguageCreationTest extends WebTestBase {
 
   public static function getInfo() {
     return array(
diff --git a/profiles/testing/modules/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.test b/profiles/testing/modules/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.test
index 198c1d8a03e5d0fb0bedd855b699489123b104d7..e4c8694046254855a6052b86be4fcab0ab03c3f0 100644
--- a/profiles/testing/modules/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.test
+++ b/profiles/testing/modules/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.test
@@ -1,9 +1,12 @@
 <?php
 
+
+use Drupal\simpletest\WebTestBase;
+
 /**
  * Helper to verify tests in installation profile modules.
  */
-class DrupalSystemListingCompatibleTestCase extends DrupalWebTestCase {
+class DrupalSystemListingCompatibleTestCase extends WebTestBase {
   /**
    * Use the Minimal profile.
    *