diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/DestinationCategoryTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/DestinationCategoryTest.php index 1ca693a..fdf78dd 100644 --- a/core/modules/migrate/tests/src/Kernel/Plugin/DestinationCategoryTest.php +++ b/core/modules/migrate/tests/src/Kernel/Plugin/DestinationCategoryTest.php @@ -17,41 +17,31 @@ class DestinationCategoryTest extends MigrateDrupalTestBase { use FileSystemModuleDiscoveryDataProviderTrait; - /** @var \Drupal\migrate\Plugin\MigrationPluginManager $migrationManager */ + /** + * The migration plugin manager. + * + * @var \Drupal\migrate\Plugin\MigrationPluginManager $migrationManager + */ protected $migrationManager; /** * {@inheritdoc} */ protected function setUp() { + // Enable all modules. + self::$modules = array_keys($this->coreModuleListDataProvider()); parent::setUp(); - $this->migrationManager = \Drupal::service('plugin.manager.migration'); } /** - * We cannot call enableModules in setup, so this is broken out. - */ - protected function enableAllModules() { - // Install all available modules. - $module_handler = $this->container->get('module_handler'); - $modules = $this->coreModuleListDataProvider(); - $modules_enabled = $module_handler->getModuleList(); - $modules_to_enable = array_keys(array_diff_key($modules, $modules_enabled)); - $this->enableModules($modules_to_enable); - $this->installConfig($modules_to_enable); - } - - /** * @covers ::getDefinitions * * @dataProvider providerMigrationCategoriesGrouped */ public function testGetGroupedDefinitions($groupedMigrations) { - $this->enableAllModules(); $definitions = $this->migrationManager->getDefinitions(); foreach ($definitions as $id => $definition) { - // if (in_array('Configuration', $definition['migration_tags'])) { $this->assertTrue(in_array($id, $groupedMigrations['Configuration'])); }