diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentPreviewTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentPreviewTest.php
index 1de62da..831e5bf 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentPreviewTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentPreviewTest.php
@@ -14,15 +14,6 @@
  */
 class CommentPreviewTest extends CommentTestBase {
 
-  /**
-   * The profile to install as a basis for testing.
-   *
-   * Using the standard profile to test user picture display in comments.
-   *
-   * @var string
-   */
-  protected $profile = 'standard';
-
   public static function getInfo() {
     return array(
       'name' => 'Comment preview',
diff --git a/core/modules/filter/lib/Drupal/filter/Tests/FilterAdminTest.php b/core/modules/filter/lib/Drupal/filter/Tests/FilterAdminTest.php
index 248a9dd..b6471a7 100644
--- a/core/modules/filter/lib/Drupal/filter/Tests/FilterAdminTest.php
+++ b/core/modules/filter/lib/Drupal/filter/Tests/FilterAdminTest.php
@@ -14,12 +14,7 @@
  */
 class FilterAdminTest extends WebTestBase {
 
-  /**
-   * The installation profile to use with this test.
-   *
-   * @var string
-   */
-  protected $profile = 'standard';
+  public static $modules = array('filter', 'node');
 
   public static function getInfo() {
     return array(
@@ -32,17 +27,12 @@ public static function getInfo() {
   function setUp() {
     parent::setUp();
 
+    $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page'));
+
     // Create users.
-    $basic_html_format = entity_load('filter_format', 'basic_html');
-    $restricted_html_format = entity_load('filter_format', 'restricted_html');
-    $full_html_format = entity_load('filter_format', 'full_html');
     $this->admin_user = $this->drupalCreateUser(array(
       'administer filters',
-      $basic_html_format->getPermissionName(),
-      $restricted_html_format->getPermissionName(),
-      $full_html_format->getPermissionName(),
     ));
-
     $this->web_user = $this->drupalCreateUser(array('create page content', 'edit own page content'));
     $this->drupalLogin($this->admin_user);
   }
diff --git a/core/modules/help/lib/Drupal/help/Tests/HelpTest.php b/core/modules/help/lib/Drupal/help/Tests/HelpTest.php
index dd21f0e..26c7cbb 100644
--- a/core/modules/help/lib/Drupal/help/Tests/HelpTest.php
+++ b/core/modules/help/lib/Drupal/help/Tests/HelpTest.php
@@ -19,10 +19,7 @@ class HelpTest extends WebTestBase {
    *
    * @var array.
    */
-  public static $modules = array('shortcut');
-
-  // Tests help implementations of many arbitrary core modules.
-  protected $profile = 'standard';
+  public static $modules = array('help');
 
   /**
    * The admin user that will be created.
diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeAccessBaseTableTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeAccessBaseTableTest.php
index e78b5bc..f90352d 100644
--- a/core/modules/node/lib/Drupal/node/Tests/NodeAccessBaseTableTest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/NodeAccessBaseTableTest.php
@@ -17,16 +17,7 @@ class NodeAccessBaseTableTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = array('node_access_test');
-
-  /**
-   * The installation profile to use with this test.
-   *
-   * This test class requires the "tags" taxonomy field.
-   *
-   * @var string
-   */
-  protected $profile = 'standard';
+  public static $modules = array('node', 'node_access_test');
 
   public static function getInfo() {
     return array(
diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeTranslationUITest.php b/core/modules/node/lib/Drupal/node/Tests/NodeTranslationUITest.php
index 7ed9f14..737f199 100644
--- a/core/modules/node/lib/Drupal/node/Tests/NodeTranslationUITest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/NodeTranslationUITest.php
@@ -22,13 +22,6 @@ class NodeTranslationUITest extends ContentTranslationUITest {
    */
   public static $modules = array('block', 'language', 'content_translation', 'node', 'datetime', 'field_ui');
 
-  /**
-   * The profile to install as a basis for testing.
-   *
-   * @var string
-   */
-  protected $profile = 'standard';
-
   public static function getInfo() {
     return array(
       'name' => 'Node translation UI',
@@ -38,9 +31,12 @@ public static function getInfo() {
   }
 
   function setUp() {
+    parent::setUp();
+
+    $this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article'));
+
     $this->entityTypeId = 'node';
     $this->bundle = 'article';
-    parent::setUp();
 
     // Ensure the help message is shown even with prefixed paths.
     $this->drupalPlaceBlock('system_help_block', array('region' => 'content'));
diff --git a/core/modules/rdf/lib/Drupal/rdf/Tests/StandardProfileTest.php b/core/modules/rdf/lib/Drupal/rdf/Tests/StandardProfileTest.php
index 2d4ed43..8913e8d 100644
--- a/core/modules/rdf/lib/Drupal/rdf/Tests/StandardProfileTest.php
+++ b/core/modules/rdf/lib/Drupal/rdf/Tests/StandardProfileTest.php
@@ -15,14 +15,7 @@
  */
 class StandardProfileTest extends WebTestBase {
 
-  /**
-   * The profile used during tests.
-   *
-   * This purposefully uses the standard profile.
-   *
-   * @var string
-   */
-  public $profile = 'standard';
+  public static $modules = array('node', 'comment', 'taxonomy', 'file', 'image');
 
   /**
    * @var string
diff --git a/core/modules/search/lib/Drupal/search/Tests/SearchCommentCountToggleTest.php b/core/modules/search/lib/Drupal/search/Tests/SearchCommentCountToggleTest.php
index cb07d81..60741d5 100644
--- a/core/modules/search/lib/Drupal/search/Tests/SearchCommentCountToggleTest.php
+++ b/core/modules/search/lib/Drupal/search/Tests/SearchCommentCountToggleTest.php
@@ -24,10 +24,7 @@ class SearchCommentCountToggleTest extends SearchTestBase {
    *
    * @var array
    */
-  public static $modules = array('comment');
-
-  // Requires node types, comment config, filter formats.
-  protected $profile = 'standard';
+  public static $modules = array('filter', 'node', 'comment', 'search');
 
   protected $searching_user;
   protected $searchable_nodes;
diff --git a/core/modules/search/lib/Drupal/search/Tests/SearchCommentTest.php b/core/modules/search/lib/Drupal/search/Tests/SearchCommentTest.php
index e3977cb..1d40247 100644
--- a/core/modules/search/lib/Drupal/search/Tests/SearchCommentTest.php
+++ b/core/modules/search/lib/Drupal/search/Tests/SearchCommentTest.php
@@ -19,9 +19,7 @@ class SearchCommentTest extends SearchTestBase {
    *
    * @var array
    */
-  public static $modules = array('comment');
-
-  protected $profile = 'standard';
+  public static $modules = array('filter', 'node', 'comment', 'search');
 
   protected $admin_user;
 
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php
index cab4b9e..cce41e5 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php
@@ -366,6 +366,9 @@ protected function enableModules(array $modules) {
     $this->pass(format_string('Enabled modules: %modules.', array(
       '%modules' => implode(', ', $modules),
     )));
+    // Reset the config factory cache to pick up the direct storage
+    // manipulations from above.
+    $this->container->get('config.factory')->reset();
   }
 
   /**
diff --git a/core/modules/system/lib/Drupal/system/Tests/Cache/PageCacheTagsIntegrationTest.php b/core/modules/system/lib/Drupal/system/Tests/Cache/PageCacheTagsIntegrationTest.php
index 4b4c799..a0fa06f 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Cache/PageCacheTagsIntegrationTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Cache/PageCacheTagsIntegrationTest.php
@@ -19,7 +19,7 @@
  */
 class PageCacheTagsIntegrationTest extends WebTestBase {
 
-  protected $profile = 'standard';
+  public static $modules = array('node');
 
   protected $dumpHeaders = TRUE;
 
diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/NoJavaScriptAnonymousTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/NoJavaScriptAnonymousTest.php
index a13e38a..7a52480 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Common/NoJavaScriptAnonymousTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Common/NoJavaScriptAnonymousTest.php
@@ -14,12 +14,12 @@
  */
 class NoJavaScriptAnonymousTest extends WebTestBase {
 
-  protected $profile = 'standard';
+  public static $modules = array('node');
 
   public static function getInfo() {
     return array(
-      'name' => 'No JavaScript for anonymous users in Standard profile',
-      'description' => 'Tests that anonymous users are not served any JavaScript in the Standard installation profile.',
+      'name' => 'No JavaScript for anonymous users',
+      'description' => 'Tests that anonymous users are not served any JavaScript.',
       'group' => 'Common',
     );
   }
@@ -27,6 +27,8 @@ public static function getInfo() {
   protected function setUp() {
     parent::setUp();
 
+    $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page'));
+
     // Grant the anonymous user the permission to look at user profiles.
     user_role_grant_permissions('anonymous', array('access user profiles'));
   }
diff --git a/core/modules/system/lib/Drupal/system/Tests/Menu/BreadcrumbTest.php b/core/modules/system/lib/Drupal/system/Tests/Menu/BreadcrumbTest.php
index d7e51c4..275fd05 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Menu/BreadcrumbTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Menu/BreadcrumbTest.php
@@ -19,12 +19,7 @@ class BreadcrumbTest extends MenuTestBase {
    *
    * @var array
    */
-  public static $modules = array('menu_test', 'block');
-
-  /**
-   * Test paths in the Standard profile.
-   */
-  protected $profile = 'standard';
+  public static $modules = array('menu_link', 'menu', 'filter', 'menu_test', 'block', 'node', 'taxonomy');
 
   public static function getInfo() {
     return array(
@@ -37,8 +32,7 @@ public static function getInfo() {
   function setUp() {
     parent::setUp();
 
-    $perms = array_keys(\Drupal::moduleHandler()->invokeAll('permission'));
-    $this->admin_user = $this->drupalCreateUser($perms);
+    $this->admin_user = $this->root_user;
     $this->drupalLogin($this->admin_user);
 
     // This test puts menu links in the Tools menu and then tests for their
diff --git a/core/modules/system/lib/Drupal/system/Tests/Module/ModuleApiTest.php b/core/modules/system/lib/Drupal/system/Tests/Module/ModuleApiTest.php
index d35ddab..5c2a43a 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Module/ModuleApiTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Module/ModuleApiTest.php
@@ -7,14 +7,13 @@
 
 namespace Drupal\system\Tests\Module;
 
-use Drupal\simpletest\WebTestBase;
+use Drupal\simpletest\DrupalUnitTestBase;
+use Symfony\Component\HttpFoundation\Response;
 
 /**
  * Unit tests for the module API.
  */
-class ModuleApiTest extends WebTestBase {
-  // Requires Standard profile modules/dependencies.
-  protected $profile = 'standard';
+class ModuleApiTest extends DrupalUnitTestBase {
 
   public static function getInfo() {
     return array(
@@ -29,18 +28,18 @@ public static function getInfo() {
    */
   function testModuleList() {
     // Build a list of modules, sorted alphabetically.
-    $profile_info = install_profile_info('standard', 'en');
+    $profile_info = install_profile_info('testing', 'en');
     $module_list = $profile_info['dependencies'];
 
     // Installation profile is a module that is expected to be loaded.
-    $module_list[] = 'standard';
+    $module_list[] = 'testing';
 
     sort($module_list);
     // Compare this list to the one returned by the extension handler. We expect
     // them to match, since all default profile modules have a weight equal to 0
     // (except for block.module, which has a lower weight but comes first in
     // the alphabet anyway).
-    $this->assertModuleList($module_list, t('Standard profile'));
+    $this->assertModuleList($module_list, t('Testing profile'));
 
     // Try to install a new module.
     \Drupal::moduleHandler()->install(array('ban'));
@@ -87,15 +86,11 @@ function testModuleImplements() {
     // Clear the cache.
     \Drupal::cache('bootstrap')->delete('module_implements');
     $this->assertFalse(\Drupal::cache('bootstrap')->get('module_implements'), 'The module implements cache is empty.');
-    $this->drupalGet('');
-    $this->assertTrue(\Drupal::cache('bootstrap')->get('module_implements'), 'The module implements cache is populated after requesting a page.');
-
-    // Test again with an authenticated user.
-    $this->user = $this->drupalCreateUser();
-    $this->drupalLogin($this->user);
-    \Drupal::cache('bootstrap')->delete('module_implements');
-    $this->drupalGet('');
-    $this->assertTrue(\Drupal::cache('bootstrap')->get('module_implements'), 'The module implements cache is populated after requesting a page.');
+    \Drupal::moduleHandler()->getImplementations('foo');
+    // @see \Drupal\Core\Extension\CachedModuleHandler::writeCache()
+    // @see \Drupal\Core\EventSubscriber\RequestCloseSubscriber
+    $this->kernel->terminate($this->container->get('request'), new Response());
+    $this->assertTrue(\Drupal::cache('bootstrap')->get('module_implements'), 'The module implements cache is populated after requesting a hook.');
 
     // Prime ModuleHandler's hook implementation cache by invoking a random hook
     // name. The subsequent \Drupal\Core\Extension\ModuleHandler::install()
@@ -110,8 +105,6 @@ function testModuleImplements() {
     // already loaded when the cache is rebuilt.
     // For that activate the module_test which provides the file to load.
     \Drupal::moduleHandler()->install(array('module_test'));
-    $module_handler->loadAll();
-    module_load_include('inc', 'module_test', 'module_test.file');
     $modules = $module_handler->getImplementations('test_hook');
     $this->assertTrue(in_array('module_test', $modules), 'Hook found.');
   }
@@ -122,9 +115,8 @@ function testModuleImplements() {
    */
   function testModuleInvoke() {
     \Drupal::moduleHandler()->install(array('module_test'), FALSE);
-    $this->resetAll();
-    $this->drupalGet('module-test/hook-dynamic-loading-invoke');
-    $this->assertText('success!', 'moduleHandler()->invoke() dynamically loads a hook defined in hook_hook_info().');
+    $actual = \Drupal::moduleHandler()->invoke('module_test', 'test_hook', array());
+    $this->assertEqual(array('module_test' => 'success!'), $actual);
   }
 
   /**
@@ -132,9 +124,8 @@ function testModuleInvoke() {
    */
   function testModuleInvokeAll() {
     \Drupal::moduleHandler()->install(array('module_test'), FALSE);
-    $this->resetAll();
-    $this->drupalGet('module-test/hook-dynamic-loading-invoke-all');
-    $this->assertText('success!', '\Drupal::moduleHandler()->invokeAll() dynamically loads a hook defined in hook_hook_info().');
+    $actual = \Drupal::moduleHandler()->invokeAll('test_hook', array());
+    $this->assertEqual(array('module_test' => 'success!'), $actual);
   }
 
   /**
@@ -158,6 +149,13 @@ function testDependencyResolution() {
     $this->assertFalse($result, '\Drupal\Core\Extension\ModuleHandler::install() returns FALSE if dependencies are missing.');
     $this->assertFalse(\Drupal::moduleHandler()->moduleExists('forum'), '\Drupal\Core\Extension\ModuleHandler::install() aborts if dependencies are missing.');
 
+    // @todo This makes no sense... Split the dependency resolution
+    //   functionality in ModuleHandler::install() into an own method instead.
+    $this->enableModules(array('system', 'user', 'entity', 'field'));
+    $this->installSchema('system', array('router'));
+    $this->installSchema('user', array('users', 'users_roles'));
+    $this->container->get('module_handler')->invoke('user', 'install');
+
     // Now, fix the missing dependency. Forum module depends on ban, but ban
     // depends on the XML-RPC module.
     // \Drupal\Core\Extension\ModuleHandler::install() should work.
@@ -171,7 +169,7 @@ function testDependencyResolution() {
     $this->assertTrue(\Drupal::moduleHandler()->moduleExists('forum'), 'Module installation with unlisted dependencies succeeded.');
     // Finally, verify that the modules were enabled in the correct order.
     $module_order = \Drupal::state()->get('module_test.install_order') ?: array();
-    $this->assertEqual($module_order, array('xmlrpc', 'ban', 'forum'), 'Modules were enabled in the correct order.');
+    $this->assertEqual($module_order, array('xmlrpc', 'ban', 'forum'));
 
     // Now uninstall all three modules explicitly, but in the incorrect order,
     // and make sure that drupal_uninstall_modules() uninstalled them in the
diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/EntityFilteringThemeTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/EntityFilteringThemeTest.php
index 8a96631..b44848c 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Theme/EntityFilteringThemeTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Theme/EntityFilteringThemeTest.php
@@ -15,15 +15,7 @@
  */
 class EntityFilteringThemeTest extends WebTestBase {
 
-  /**
-   * Use the standard profile.
-   *
-   * We test entity theming with the default node, user, comment, and taxonomy
-   * configurations at several paths in the standard profile.
-   *
-   * @var string
-   */
-  protected $profile = 'standard';
+  public static $modules = array('user', 'node', 'taxonomy', 'comment');
 
   /**
    * A list of all available themes.
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/LegacyTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/LegacyTest.php
index cddfefd..f8cf794 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/LegacyTest.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/LegacyTest.php
@@ -14,8 +14,6 @@
  */
 class LegacyTest extends TaxonomyTestBase {
 
-  protected $profile = 'standard';
-
   public static function getInfo() {
     return array(
       'name' => 'Test for legacy node bug.',
@@ -26,6 +24,43 @@ public static function getInfo() {
 
   function setUp() {
     parent::setUp();
+    $this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article'));
+
+    // Create a default vocabulary named "Tags", enabled for the 'article' content type.
+    $vocabulary = entity_create('taxonomy_vocabulary', array(
+      'name' => 'Tags',
+      'vid' => 'tags',
+    ));
+    taxonomy_vocabulary_save($vocabulary);
+
+    $field = array(
+      'field_name' => 'field_' . $vocabulary->id(),
+      'type' => 'taxonomy_term_reference',
+      // Set cardinality to unlimited for tagging.
+      'cardinality' => FIELD_CARDINALITY_UNLIMITED,
+      'settings' => array(
+        'allowed_values' => array(
+          array(
+            'vocabulary' => $vocabulary->id(),
+            'parent' => 0,
+          ),
+        ),
+      ),
+    );
+    field_create_field($field);
+
+    $instance = array(
+      'field_name' => 'field_' . $vocabulary->id(),
+      'entity_type' => 'node',
+      'label' => 'Tags',
+      'bundle' => 'article',
+      'widget' => array(
+        'type' => 'taxonomy_autocomplete',
+        'weight' => -4,
+      ),
+    );
+    field_create_instance($instance);
+
     $this->admin_user = $this->drupalCreateUser(array('administer taxonomy', 'administer nodes', 'bypass node access'));
     $this->drupalLogin($this->admin_user);
   }
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserPictureTest.php b/core/modules/user/lib/Drupal/user/Tests/UserPictureTest.php
index 26f4dc9..3856770 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserPictureTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserPictureTest.php
@@ -14,15 +14,7 @@
  */
 class UserPictureTest extends WebTestBase {
 
-  /**
-   * The profile to install as a basis for testing.
-   *
-   * Using the standard profile to test user picture config provided by the
-   * standard profile.
-   *
-   * @var string
-   */
-  protected $profile = 'standard';
+  public static $modules = array('user', 'field', 'image', 'node', 'comment');
 
   protected $user;
   protected $_directory_test;
