diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index 77458a1..a425927 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -2433,6 +2433,16 @@ function drupal_container(Container $new_container = NULL, $rebuild = FALSE) {
     // requests.
     $container = new ContainerBuilder();
 
+    // Database.
+    $container->register('database', 'Drupal\Core\Database\Connection')
+      ->setFactoryClass('Drupal\Core\Database\Database')
+      ->setFactoryMethod('getConnection')
+      ->addArgument('default');
+    $container->register('database.slave', 'Drupal\Core\Database\Connection')
+      ->setFactoryClass('Drupal\Core\Database\Database')
+      ->setFactoryMethod('getConnection')
+      ->addArgument('slave');
+
     // Register active configuration storage.
     $container
       ->register('config.cachedstorage.storage', 'Drupal\Core\Config\FileStorage')
diff --git a/core/includes/config.inc b/core/includes/config.inc
index 39094f8..33d00a9 100644
--- a/core/includes/config.inc
+++ b/core/includes/config.inc
@@ -157,8 +157,6 @@ function config_import() {
   try {
     $remaining_changes = config_import_invoke_owner($config_changes, $source_storage, $target_storage);
     config_sync_changes($remaining_changes, $source_storage, $target_storage);
-    // Flush all caches and reset static variables after a successful import.
-    drupal_flush_all_caches();
   }
   catch (ConfigException $e) {
     watchdog_exception('config_import', $e);
diff --git a/core/lib/Drupal/Core/CoreBundle.php b/core/lib/Drupal/Core/CoreBundle.php
index ed15dd5..01acc7d 100644
--- a/core/lib/Drupal/Core/CoreBundle.php
+++ b/core/lib/Drupal/Core/CoreBundle.php
@@ -46,14 +46,6 @@ public function build(ContainerBuilder $container) {
     $container->register('language_manager', 'Drupal\Core\Language\LanguageManager')
       ->addArgument(new Reference('request'))
       ->setScope('request');
-    $container->register('database', 'Drupal\Core\Database\Connection')
-      ->setFactoryClass('Drupal\Core\Database\Database')
-      ->setFactoryMethod('getConnection')
-      ->addArgument('default');
-    $container->register('database.slave', 'Drupal\Core\Database\Connection')
-      ->setFactoryClass('Drupal\Core\Database\Database')
-      ->setFactoryMethod('getConnection')
-      ->addArgument('slave');
     $container->register('typed_data', 'Drupal\Core\TypedData\TypedDataManager');
     // Add the user's storage for temporary, non-cache data.
     $container->register('lock', 'Drupal\Core\Lock\DatabaseLockBackend');
diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigCRUDTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigCRUDTest.php
index 9eea495..460f497 100644
--- a/core/modules/config/lib/Drupal/config/Tests/ConfigCRUDTest.php
+++ b/core/modules/config/lib/Drupal/config/Tests/ConfigCRUDTest.php
@@ -7,12 +7,12 @@
 
 namespace Drupal\config\Tests;
 
-use Drupal\simpletest\WebTestBase;
+use Drupal\simpletest\DrupalUnitTestBase;
 
 /**
  * Tests CRUD operations on configuration objects.
  */
-class ConfigCRUDTest extends WebTestBase {
+class ConfigCRUDTest extends DrupalUnitTestBase {
   public static function getInfo() {
     return array(
       'name' => 'CRUD operations',
diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigFileContentTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigFileContentTest.php
index 79d7881..dfc0d66 100644
--- a/core/modules/config/lib/Drupal/config/Tests/ConfigFileContentTest.php
+++ b/core/modules/config/lib/Drupal/config/Tests/ConfigFileContentTest.php
@@ -8,12 +8,12 @@
 namespace Drupal\config\Tests;
 
 use Drupal\Core\Config\FileStorage;
-use Drupal\simpletest\WebTestBase;
+use Drupal\simpletest\DrupalUnitTestBase;
 
 /**
  * Tests reading and writing file contents.
  */
-class ConfigFileContentTest extends WebTestBase {
+class ConfigFileContentTest extends DrupalUnitTestBase {
   public static function getInfo() {
     return array(
       'name' => 'File content',
diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigImportTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigImportTest.php
index 9316962..61220de 100644
--- a/core/modules/config/lib/Drupal/config/Tests/ConfigImportTest.php
+++ b/core/modules/config/lib/Drupal/config/Tests/ConfigImportTest.php
@@ -7,12 +7,12 @@
 
 namespace Drupal\config\Tests;
 
-use Drupal\simpletest\WebTestBase;
+use Drupal\simpletest\DrupalUnitTestBase;
 
 /**
  * Tests importing configuration from files into active store.
  */
-class ConfigImportTest extends WebTestBase {
+class ConfigImportTest extends DrupalUnitTestBase {
 
   /**
    * Modules to enable.
@@ -32,7 +32,10 @@ public static function getInfo() {
   function setUp() {
     parent::setUp();
 
-    // Clear out any possibly existing hook invocation records.
+    config_install_default_config('module', 'config_test');
+    // Installing config_test's default configuration pollutes the global
+    // variable being used for recording hook invocations by this test already,
+    // so it has to be cleared out manually.
     unset($GLOBALS['hook_config_test']);
   }
 
diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigInstallTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigInstallTest.php
index 3e6a88e..531c496 100644
--- a/core/modules/config/lib/Drupal/config/Tests/ConfigInstallTest.php
+++ b/core/modules/config/lib/Drupal/config/Tests/ConfigInstallTest.php
@@ -7,12 +7,12 @@
 
 namespace Drupal\config\Tests;
 
-use Drupal\simpletest\WebTestBase;
+use Drupal\simpletest\DrupalUnitTestBase;
 
 /**
  * Tests installation of configuration objects in installation functionality.
  */
-class ConfigInstallTest extends WebTestBase {
+class ConfigInstallTest extends DrupalUnitTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Installation functionality',
@@ -21,6 +21,11 @@ public static function getInfo() {
     );
   }
 
+  function setUp() {
+    parent::setUp();
+    $this->installSchema('system', 'system');
+  }
+
   /**
    * Tests module installation.
    */
@@ -35,7 +40,7 @@ function testModuleInstallation() {
     $this->assertIdentical($config->isNew(), TRUE);
 
     // Install the test module.
-    module_enable(array('config_test'));
+    $this->enableModules(array('config_test'));
 
     // Verify that default module config exists.
     $config = config($default_config);
diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigOverrideTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigOverrideTest.php
index 4e0d8f7..de7784f 100644
--- a/core/modules/config/lib/Drupal/config/Tests/ConfigOverrideTest.php
+++ b/core/modules/config/lib/Drupal/config/Tests/ConfigOverrideTest.php
@@ -7,12 +7,12 @@
 
 namespace Drupal\config\Tests;
 
-use Drupal\simpletest\WebTestBase;
+use Drupal\simpletest\DrupalUnitTestBase;
 
 /**
  * Tests configuration overrides via $conf in settings.php.
  */
-class ConfigOverrideTest extends WebTestBase {
+class ConfigOverrideTest extends DrupalUnitTestBase {
 
   /**
    * Modules to enable.
@@ -29,6 +29,12 @@ public static function getInfo() {
     );
   }
 
+  function setUp() {
+    parent::setUp();
+
+    config_install_default_config('module', 'config_test');
+  }
+
   /**
    * Tests configuration override.
    */
diff --git a/core/modules/config/lib/Drupal/config/Tests/Storage/ConfigStorageTestBase.php b/core/modules/config/lib/Drupal/config/Tests/Storage/ConfigStorageTestBase.php
index 6b7a74f..064146c 100644
--- a/core/modules/config/lib/Drupal/config/Tests/Storage/ConfigStorageTestBase.php
+++ b/core/modules/config/lib/Drupal/config/Tests/Storage/ConfigStorageTestBase.php
@@ -7,7 +7,7 @@
 
 namespace Drupal\config\Tests\Storage;
 
-use Drupal\simpletest\WebTestBase;
+use Drupal\simpletest\DrupalUnitTestBase;
 
 /**
  * Base class for testing storage controller operations.
@@ -21,7 +21,7 @@
  * supply the necessary helper methods to interact with the raw/native storage
  * directly.
  */
-abstract class ConfigStorageTestBase extends WebTestBase {
+abstract class ConfigStorageTestBase extends DrupalUnitTestBase {
 
   /**
    * Tests storage controller CRUD operations.
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php
new file mode 100644
index 0000000..f1586cc
--- /dev/null
+++ b/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php
@@ -0,0 +1,136 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\simpletest\DrupalUnitTestBase.
+ */
+
+namespace Drupal\simpletest;
+
+use Drupal\Core\Database\Database;
+
+/**
+ * Base test case class for Drupal unit tests.
+ *
+ * Tests extending this base class can access files and the database, but the
+ * entire environment is initially empty. Drupal runs in a minimal mocked
+ * environment, comparable to the one in the installer or update.php.
+ *
+ * The module/hook system is functional and operates on a fixed module list.
+ * Additional modules needed in a test may be loaded and added to the fixed
+ * module list.
+ *
+ * @see DrupalUnitTestBase::enableModules()
+ *
+ * By installing the {system} schema, modules may be fully installed, too.
+ *
+ * @see DrupalUnitTestBase::installSchema()
+ */
+abstract class DrupalUnitTestBase extends UnitTestBase {
+
+  /**
+   * Modules to enable.
+   *
+   * Test classes extending this class, and any classes in the hierarchy up to
+   * this class, may specify individual lists of modules to enable by setting
+   * this property. The values of all properties in all classes in the hierarchy
+   * are merged.
+   *
+   * @see DrupalUnitTestBase::setUp()
+   *
+   * @var array
+   */
+  public static $modules = array();
+
+  /**
+   * Fixed module list being used by this test.
+   *
+   * @var array
+   *   An associative array containing the required data for the $fixed_list
+   *   argument of module_list().
+   *
+   * @see UnitTestBase::setUp()
+   * @see UnitTestBase::enableModules()
+   */
+  private $moduleList = array();
+
+  /**
+   * 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() {
+    parent::setUp();
+
+    // Ensure that the module list is initially empty.
+    $this->moduleList = array();
+    // Collect and set a fixed module list.
+    $class = get_class($this);
+    $modules = array();
+    while ($class) {
+      if (property_exists($class, 'modules')) {
+        $modules = array_merge($modules, $class::$modules);
+      }
+      $class = get_parent_class($class);
+    }
+    $this->enableModules($modules, FALSE);
+  }
+
+  /**
+   * Installs a specific table from a module schema definition.
+   *
+   * @param string $module
+   *   The name of the module that defines the table's schema.
+   * @param string $table
+   *   The name of the table to install.
+   */
+  protected function installSchema($module, $table) {
+    require_once DRUPAL_ROOT . '/' . drupal_get_path('module', $module) . "/$module.install";
+    $function = $module . '_schema';
+    $schema = $function();
+    Database::getConnection()->schema()->createTable($table, $schema[$table]);
+  }
+
+  /**
+   * Enables modules for this test.
+   *
+   * Callbacks invoked by module_enable() may need to access information
+   * provided by info hooks of the new modules already. However, module_enable()
+   * enables the new modules in {system} only, but that has no effect, since we
+   * are operating with a fixed module list.
+   *
+   * The {system} table is required to install new modules. Install it via:
+   * @code
+   *   $this->installSchema('system', 'system');
+   * @endcode
+   *
+   * @param array $modules
+   *   A list of modules to enable.
+   * @param bool $install
+   *   (optional) Whether to install the list of modules via module_enable().
+   *   Defaults to TRUE. Requires the {system} table to exist. If FALSE, the new
+   *   modules are only added to the fixed module list and loaded.
+   *
+   * @todo Remove this method as soon as there is an Extensions service
+   *   implementation that is able to manage a fixed module list.
+   */
+  protected function enableModules(array $modules, $install = TRUE) {
+    // Set the modules in the fixed module_list().
+    foreach ($modules as $module) {
+      $this->moduleList[$module] = drupal_get_path('module', $module);
+    }
+    module_list(NULL, $this->moduleList);
+
+    // Call module_enable() to enable (install) the new modules.
+    if ($install) {
+      module_enable($modules);
+    }
+    // Otherwise, only ensure that the new modules are loaded.
+    else {
+      module_load_all(FALSE, TRUE);
+    }
+  }
+}
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
index 7320a74..caca86d 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
@@ -732,6 +732,20 @@ protected function prepareEnvironment() {
     $this->originalThemeKey = $GLOBALS['theme_key'];
     $this->originalTheme = $GLOBALS['theme'];
 
+    // Back up all current global variables, so as be able to restore them in
+    // TestBase::tearDown(). Without this, global variables of a previous test
+    // case/method would leak into the next test case/method.
+    // PHP opens the door to insanity when trying to use array_* functions (such
+    // as array_diff_key()) on the $GLOBALS superglobal. We have to loop over
+    // the keys in $GLOBALS manually.
+    $this->originalGlobals = array();
+    $php_globals = $this->listPhpGlobals();
+    foreach ($GLOBALS as $key => $value) {
+      if (!isset($php_globals[$key])) {
+        $this->originalGlobals[$key] = $value;
+      }
+    }
+
     // Save further contextual information.
     $this->originalFileDirectory = variable_get('file_public_path', conf_path() . '/files');
     $this->originalProfile = drupal_get_profile();
@@ -763,30 +777,36 @@ protected function prepareEnvironment() {
     file_prepare_directory($this->translation_files_directory, FILE_CREATE_DIRECTORY);
     $this->generatedTestFiles = FALSE;
 
+    // Unset all globals.
+    // @todo Make it possible to unset() all non-PHP globals - or to
+    //   "re-bootstrap" Drupal. The global variables being set up by
+    //   drupal_environment_initialize() and drupal_settings_initialize()
+    //   prevent that currently.
+    //$GLOBALS = array();
+    unset($GLOBALS['theme_key']);
+    unset($GLOBALS['theme']);
+
     // Create and set new configuration directories. The child site
     // uses drupal_valid_test_ua() to adjust the config directory paths to
     // a test-prefix-specific directory within the public files directory.
     // @see config_get_config_directory()
     $GLOBALS['config_directories'] = array();
-    foreach (array(CONFIG_ACTIVE_DIRECTORY, CONFIG_STAGING_DIRECTORY) as $type) {
-      $GLOBALS['config_directories'][$type]['path'] = 'simpletest/' . substr($this->databasePrefix, 10) . '/config_' . $type;
-    }
-
-    // Reset and create a new service container.
-    $this->container = drupal_container(NULL, TRUE);
-
     $this->configDirectories = array();
     include_once DRUPAL_ROOT . '/core/includes/install.inc';
-    foreach ($GLOBALS['config_directories'] as $type => $directory) {
+    foreach (array(CONFIG_ACTIVE_DIRECTORY, CONFIG_STAGING_DIRECTORY) as $type) {
+      // Assign the relative path to the global variable.
+      $path = 'simpletest/' . substr($this->databasePrefix, 10) . '/config_' . $type;
+      $GLOBALS['config_directories'][$type]['path'] = $path;
+      // Ensure the directory can be created and is writeable.
       if (!install_ensure_config_directory($type)) {
         return FALSE;
       }
-      $this->configDirectories[$type] = $this->originalFileDirectory . '/' . $directory['path'];
+      // Provide the already resolved path for tests.
+      $this->configDirectories[$type] = $this->originalFileDirectory . '/' . $path;
     }
 
-    // Unset globals.
-    unset($GLOBALS['theme_key']);
-    unset($GLOBALS['theme']);
+    // Reset and create a new service container.
+    $this->container = drupal_container(NULL, TRUE);
 
     // Re-initialize the theme to ensure that tests do not see an inconsistent
     // behavior when calling functions that would initialize the theme if it has
@@ -807,6 +827,15 @@ protected function prepareEnvironment() {
   }
 
   /**
+   * Lists reserved keys of PHP $GLOBALS.
+   */
+  private function listPhpGlobals() {
+    return array_flip(array(
+      'GLOBALS', 'argv', 'argc', '_POST', '_GET', '_COOKIE', '_FILES', '_ENV', '_REQUEST', '_SERVER',
+    ));
+  }
+
+  /**
    * Deletes created files, database tables, and reverts all environment changes.
    *
    * This method needs to be invoked for both unit and integration tests.
@@ -819,6 +848,24 @@ protected function tearDown() {
     global $user, $conf;
     $language_interface = language(LANGUAGE_TYPE_INTERFACE);
 
+    // Ensure that TestBase::changeDatabasePrefix() has run and TestBase::$setup
+    // was not tricked into TRUE, since the following code would delete the
+    // entire parent site otherwise.
+    if ($this->setupDatabasePrefix) {
+      // Remove all prefixed tables.
+      $connection_info = Database::getConnectionInfo('default');
+      $tables = db_find_tables($connection_info['default']['prefix']['default'] . '%');
+      $prefix_length = strlen($connection_info['default']['prefix']['default']);
+      foreach ($tables as $table) {
+        if (db_drop_table(substr($table, $prefix_length))) {
+          unset($tables[$table]);
+        }
+      }
+      if (!empty($tables)) {
+        $this->fail('Failed to drop all prefixed tables.');
+      }
+    }
+
     // In case a fatal error occurred that was not in the test process read the
     // log to pick up any fatal errors.
     simpletest_log_read($this->testId, $this->databasePrefix, get_class($this), TRUE);
@@ -841,6 +888,20 @@ protected function tearDown() {
     $databases['default']['default'] = $connection_info['default'];
 
     // Restore original globals.
+    // First, unset any global variable that is not a reserved PHP global.
+    $php_globals = $this->listPhpGlobals();
+    foreach ($GLOBALS as $key => $value) {
+      if (!isset($php_globals[$key])) {
+        unset($GLOBALS[$key]);
+      }
+    }
+    // Second, re-set all global variables that existed prior to executing the
+    // test.
+    foreach ($this->originalGlobals as $key => $value) {
+      if (!isset($php_globals[$key])) {
+        $GLOBALS[$key] = $value;
+      }
+    }
     $GLOBALS['theme_key'] = $this->originalThemeKey;
     $GLOBALS['theme'] = $this->originalTheme;
 
@@ -876,6 +937,7 @@ protected function tearDown() {
    */
   public function errorHandler($severity, $message, $file = NULL, $line = NULL) {
     if ($severity & error_reporting()) {
+      require_once DRUPAL_ROOT . '/core/includes/errors.inc';
       $error_map = array(
         E_STRICT => 'Run-time notice',
         E_WARNING => 'Warning',
@@ -889,6 +951,14 @@ public function errorHandler($severity, $message, $file = NULL, $line = NULL) {
       );
 
       $backtrace = debug_backtrace();
+
+      // Add verbose backtrace for errors, but not for debug() messages.
+      if ($severity !== E_USER_NOTICE) {
+        $verbose_backtrace = $backtrace;
+        array_shift($verbose_backtrace);
+        $message .= '<pre class="backtrace">' . format_backtrace($verbose_backtrace) . '</pre>';
+      }
+
       $this->error($message, $error_map[$severity], _drupal_get_last_caller($backtrace));
     }
     return TRUE;
@@ -900,15 +970,19 @@ public function errorHandler($severity, $message, $file = NULL, $line = NULL) {
    * @see set_exception_handler
    */
   protected function exceptionHandler($exception) {
+    require_once DRUPAL_ROOT . '/core/includes/errors.inc';
     $backtrace = $exception->getTrace();
+    $verbose_backtrace = $backtrace;
     // Push on top of the backtrace the call that generated the exception.
     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));
+    $message = format_string('%type: !message in %function (line %line of %file). <pre class="backtrace">!backtrace</pre>', _drupal_decode_exception($exception) + array(
+      '!backtrace' => format_backtrace($verbose_backtrace),
+    ));
+    $this->error($message, 'Uncaught exception', _drupal_get_last_caller($backtrace));
   }
 
   /**
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/UnitTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/UnitTestBase.php
index 98ed71d..9a5d658 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/UnitTestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/UnitTestBase.php
@@ -11,7 +11,7 @@
 use Drupal\Core\Database\ConnectionNotDefinedException;
 
 /**
- * Test case for Drupal unit tests.
+ * Base test case class for unit tests.
  *
  * These tests can not access the database nor files. Calling any Drupal
  * function that needs the database will throw exceptions. These include
@@ -46,7 +46,6 @@ protected function setUp() {
     if (!$this->setupEnvironment) {
       return FALSE;
     }
-    $this->originalThemeRegistry = theme_get_registry(FALSE);
 
     // Reset all statics and variables to perform tests in a clean environment.
     $conf = array();
@@ -55,7 +54,12 @@ protected function setUp() {
     // Enforce an empty module list.
     module_list(NULL, array());
 
+    // Provide a minimal, partially mocked environment for unit tests.
     $conf['file_public_path'] = $this->public_files_directory;
+    $conf['lock_backend'] = 'Drupal\Core\Lock\NullLockBackend';
+    $conf['cache_classes'] = array('cache' => 'Drupal\Core\Cache\NullBackend');
+    $this->container->register('config.storage', 'Drupal\Core\Config\FileStorage')
+      ->addArgument($this->configDirectories[CONFIG_ACTIVE_DIRECTORY]);
 
     // Change the database prefix.
     // All static variables need to be reset before the database prefix is
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
index 24bf1f2..a09c0fc 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
@@ -783,32 +783,10 @@ protected function refreshVariables() {
    * and reset the database prefix.
    */
   protected function tearDown() {
-    // Ensure that TestBase::changeDatabasePrefix() has run and TestBase::$setup
-    // was not tricked into TRUE, since the following code would delete the
-    // entire parent site otherwise.
-    if (!$this->setupDatabasePrefix) {
-      return FALSE;
-    }
     // Destroy the testing kernel.
     if (isset($this->kernel)) {
       $this->kernel->shutdown();
     }
-    // Remove all prefixed tables.
-    $connection_info = Database::getConnectionInfo('default');
-    $tables = db_find_tables($connection_info['default']['prefix']['default'] . '%');
-    if (empty($tables)) {
-      $this->fail('Failed to find test tables to drop.');
-    }
-    $prefix_length = strlen($connection_info['default']['prefix']['default']);
-    foreach ($tables as $table) {
-      if (db_drop_table(substr($table, $prefix_length))) {
-        unset($tables[$table]);
-      }
-    }
-    if (!empty($tables)) {
-      $this->fail('Failed to drop all prefixed tables.');
-    }
-
     parent::tearDown();
 
     // Ensure that internal logged in variable and cURL options are reset.
