diff --git a/core/modules/aggregator/src/Tests/AggregatorConfigurationTest.php b/core/modules/aggregator/src/Tests/AggregatorConfigurationTest.php
index a3d9a44..9f43fc0 100644
--- a/core/modules/aggregator/src/Tests/AggregatorConfigurationTest.php
+++ b/core/modules/aggregator/src/Tests/AggregatorConfigurationTest.php
@@ -60,7 +60,7 @@ function testSettingsPage() {
 
     // Make sure settings form is still accessible even after disabling a module
     // that provides the selected plugins.
-    module_uninstall(array('aggregator_test'));
+    $this->container->get('module_handler')->uninstall(array('aggregator_test'));
     $this->resetAll();
     $this->drupalGet('admin/config/services/aggregator/settings');
     $this->assertResponse(200);
diff --git a/core/modules/aggregator/src/Tests/UpdateFeedItemTest.php b/core/modules/aggregator/src/Tests/UpdateFeedItemTest.php
index d53bdd1..6d8e9f3 100644
--- a/core/modules/aggregator/src/Tests/UpdateFeedItemTest.php
+++ b/core/modules/aggregator/src/Tests/UpdateFeedItemTest.php
@@ -73,7 +73,7 @@ function testUpdateFeedItem() {
     // Make sure updating items works even after disabling a module
     // that provides the selected plugins.
     $this->enableTestPlugins();
-    module_uninstall(array('aggregator_test'));
+    $this->container->get('module_handler')->uninstall(array('aggregator_test'));
     $this->updateFeedItems($feed);
     $this->assertResponse(200);
   }
diff --git a/core/modules/config/src/Tests/ConfigInstallWebTest.php b/core/modules/config/src/Tests/ConfigInstallWebTest.php
index 776daa4..65d5424 100644
--- a/core/modules/config/src/Tests/ConfigInstallWebTest.php
+++ b/core/modules/config/src/Tests/ConfigInstallWebTest.php
@@ -71,7 +71,7 @@ function testIntegrationModuleReinstallation() {
     $this->container->get('config.factory')->reset();
 
     // Disable and uninstall the integration module.
-    module_uninstall(array('config_integration_test'));
+    $this->container->get('module_handler')->uninstall(array('config_integration_test'));
 
     // Verify the integration module's config was uninstalled.
     $config_static = \Drupal::config($default_config);
diff --git a/core/modules/system/src/Tests/Entity/EntityApiInfoTest.php b/core/modules/system/src/Tests/Entity/EntityApiInfoTest.php
index 252fb09..e970e05 100644
--- a/core/modules/system/src/Tests/Entity/EntityApiInfoTest.php
+++ b/core/modules/system/src/Tests/Entity/EntityApiInfoTest.php
@@ -40,7 +40,7 @@ function testEntityInfoChanges() {
     $this->assertEqual($entity_type->getLabel(), 'New label.', 'New label appears in entity info.');
 
     // Uninstall the providing module and make sure the entity type is gone.
-    module_uninstall(array('entity_cache_test', 'entity_cache_test_dependency'));
+    $this->container->get('module_handler')->uninstall(array('entity_cache_test', 'entity_cache_test_dependency'));
     $entity_types = \Drupal::entityManager()->getDefinitions();
     $this->assertFalse(isset($entity_types['entity_cache_test']), 'Entity type of the providing module is gone.');
   }
diff --git a/core/modules/system/src/Tests/Form/LanguageSelectElementTest.php b/core/modules/system/src/Tests/Form/LanguageSelectElementTest.php
index f4171f0..0c72260 100644
--- a/core/modules/system/src/Tests/Form/LanguageSelectElementTest.php
+++ b/core/modules/system/src/Tests/Form/LanguageSelectElementTest.php
@@ -81,7 +81,7 @@ function testLanguageSelectElementOptions() {
   function testHiddenLanguageSelectElement() {
     // Disable the language module, so that the language select field will not
     // be rendered.
-    module_uninstall(array('language'));
+    $this->container->get('module_handler')->uninstall(array('language'));
     $this->drupalGet('form-test/language_select');
     // Check that the language fields were rendered on the page.
     $ids = array('edit-languages-all', 'edit-languages-configurable', 'edit-languages-locked', 'edit-languages-config-and-locked');
diff --git a/core/modules/system/src/Tests/Module/ClassLoaderTest.php b/core/modules/system/src/Tests/Module/ClassLoaderTest.php
index 71f29d4..dd13694 100644
--- a/core/modules/system/src/Tests/Module/ClassLoaderTest.php
+++ b/core/modules/system/src/Tests/Module/ClassLoaderTest.php
@@ -50,7 +50,7 @@ function testClassLoading() {
    */
   function testClassLoadingDisabledModules() {
     // Ensure that module_autoload_test is disabled.
-    module_uninstall(array('module_autoload_test'), FALSE);
+    $this->container->get('module_handler')->uninstall(array('module_autoload_test'), FALSE);
     $this->resetAll();
     // Check twice to test an unprimed and primed system_list() cache.
     for ($i=0; $i<2; $i++) {
diff --git a/core/modules/system/src/Tests/Module/UninstallTest.php b/core/modules/system/src/Tests/Module/UninstallTest.php
index bbb4399..65ac652 100644
--- a/core/modules/system/src/Tests/Module/UninstallTest.php
+++ b/core/modules/system/src/Tests/Module/UninstallTest.php
@@ -36,7 +36,7 @@ public static function getInfo() {
   function testUserPermsUninstalled() {
     // Uninstalls the module_test module, so hook_modules_uninstalled()
     // is executed.
-    module_uninstall(array('module_test'));
+    $this->container->get('module_handler')->uninstall(array('module_test'));
 
     // Are the perms defined by module_test removed?
     $this->assertFalse(user_roles(FALSE, 'module_test perm'), 'Permissions were all removed.');
diff --git a/core/modules/taxonomy/src/Tests/VocabularyCrudTest.php b/core/modules/taxonomy/src/Tests/VocabularyCrudTest.php
index 5867695..27b590f 100644
--- a/core/modules/taxonomy/src/Tests/VocabularyCrudTest.php
+++ b/core/modules/taxonomy/src/Tests/VocabularyCrudTest.php
@@ -196,7 +196,7 @@ function testUninstallReinstall() {
     entity_create('field_instance_config', $this->instance_definition)->save();
 
     require_once DRUPAL_ROOT . '/core/includes/install.inc';
-    module_uninstall(array('taxonomy'));
+    $this->container->get('module_handler')->uninstall(array('taxonomy'));
     \Drupal::moduleHandler()->install(array('taxonomy'));
 
     // Now create a vocabulary with the same name. All field instances
