diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh
index a953dd7..684b3e8 100755
--- a/core/scripts/run-tests.sh
+++ b/core/scripts/run-tests.sh
@@ -64,7 +64,7 @@
   exit;
 }
 
-$test_list = simpletest_script_get_test_list();
+$test_list = array_fill(0, 1, 'Drupal\system\Tests\Module\ModuleApiTest');
 
 // Try to allocate unlimited time to run the tests.
 drupal_set_time_limit(0);
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
