From 937be05a99fff6efe0ac0c644db159c3bd10401c Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Fri, 18 Jul 2014 11:40:22 +0100 Subject: [PATCH] Issue #2294083 by ParisLiakos: Remove usages of module_uninstall(). --- .../aggregator/src/Tests/AggregatorConfigurationTest.php | 2 +- core/modules/aggregator/src/Tests/UpdateFeedItemTest.php | 2 +- core/modules/config/src/Tests/ConfigInstallWebTest.php | 2 +- core/modules/system/src/Tests/Entity/EntityApiInfoTest.php | 2 +- .../modules/system/src/Tests/Form/LanguageSelectElementTest.php | 2 +- core/modules/system/src/Tests/Module/ClassLoaderTest.php | 2 +- core/modules/system/src/Tests/Module/UninstallTest.php | 2 +- core/modules/taxonomy/src/Tests/VocabularyCrudTest.php | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/modules/aggregator/src/Tests/AggregatorConfigurationTest.php b/core/modules/aggregator/src/Tests/AggregatorConfigurationTest.php index 45bed8b83991..4feb6c6a4674 100644 --- a/core/modules/aggregator/src/Tests/AggregatorConfigurationTest.php +++ b/core/modules/aggregator/src/Tests/AggregatorConfigurationTest.php @@ -54,7 +54,7 @@ class AggregatorConfigurationTest extends AggregatorTestBase { // 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 3cc6ca25b13c..a7441802e7d0 100644 --- a/core/modules/aggregator/src/Tests/UpdateFeedItemTest.php +++ b/core/modules/aggregator/src/Tests/UpdateFeedItemTest.php @@ -67,7 +67,7 @@ class UpdateFeedItemTest extends AggregatorTestBase { // 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 59a4a22b5d0f..9fedd0936927 100644 --- a/core/modules/config/src/Tests/ConfigInstallWebTest.php +++ b/core/modules/config/src/Tests/ConfigInstallWebTest.php @@ -66,7 +66,7 @@ class ConfigInstallWebTest extends WebTestBase { $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 17f5cbe81a41..a32a23900345 100644 --- a/core/modules/system/src/Tests/Entity/EntityApiInfoTest.php +++ b/core/modules/system/src/Tests/Entity/EntityApiInfoTest.php @@ -34,7 +34,7 @@ class EntityApiInfoTest extends WebTestBase { $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 ca7c9afc5783..9aa340022c61 100644 --- a/core/modules/system/src/Tests/Form/LanguageSelectElementTest.php +++ b/core/modules/system/src/Tests/Form/LanguageSelectElementTest.php @@ -76,7 +76,7 @@ class LanguageSelectElementTest extends WebTestBase { 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 fcfb205f3b6b..ffbda533ecf1 100644 --- a/core/modules/system/src/Tests/Module/ClassLoaderTest.php +++ b/core/modules/system/src/Tests/Module/ClassLoaderTest.php @@ -44,7 +44,7 @@ class ClassLoaderTest extends WebTestBase { */ 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 39bfa79c85ad..797b95a6be8e 100644 --- a/core/modules/system/src/Tests/Module/UninstallTest.php +++ b/core/modules/system/src/Tests/Module/UninstallTest.php @@ -30,7 +30,7 @@ class UninstallTest extends WebTestBase { 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 5525a2cb8fb7..3f615096e406 100644 --- a/core/modules/taxonomy/src/Tests/VocabularyCrudTest.php +++ b/core/modules/taxonomy/src/Tests/VocabularyCrudTest.php @@ -190,7 +190,7 @@ class VocabularyCrudTest extends TaxonomyTestBase { 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