diff --git a/core/modules/file/src/Tests/Migrate/d6/MigrateFileTest.php b/core/modules/file/src/Tests/Migrate/d6/MigrateFileTest.php index dbd332c..5c416e4 100644 --- a/core/modules/file/src/Tests/Migrate/d6/MigrateFileTest.php +++ b/core/modules/file/src/Tests/Migrate/d6/MigrateFileTest.php @@ -77,7 +77,7 @@ public function testFiles() { $this->assertEntity(5, 'html-1.txt', '24', 'public://html-1.txt', 'text/plain', '1'); // Test that we can re-import and also test with file_directory_path set. - $migration_plugin_manager = $this->getMigration(); + $migration_plugin_manager = $this->container->get('plugin.manager.migration'); \Drupal::database() ->truncate($migration_plugin_manager->createInstance('d6_file')->getIdMap()->mapTableName()) ->execute(); diff --git a/core/modules/migrate/src/Tests/MigrateTestBase.php b/core/modules/migrate/src/Tests/MigrateTestBase.php index 87f81d3..e6cb24e 100644 --- a/core/modules/migrate/src/Tests/MigrateTestBase.php +++ b/core/modules/migrate/src/Tests/MigrateTestBase.php @@ -227,7 +227,7 @@ protected function mockFailure($migration, array $row, $status = MigrateIdMapInt } /** - * @return \Drupal\migrate\Plugin\MigrationPluginManager + * @return \\Drupal\migrate\Plugin\Migration */ protected function getMigration($plugin_id) { return $this->container->get('plugin.manager.migration')->createInstance($plugin_id); diff --git a/core/modules/node/src/Tests/Migrate/d6/MigrateNodeTest.php b/core/modules/node/src/Tests/Migrate/d6/MigrateNodeTest.php index c18d3cf..1f2816b 100644 --- a/core/modules/node/src/Tests/Migrate/d6/MigrateNodeTest.php +++ b/core/modules/node/src/Tests/Migrate/d6/MigrateNodeTest.php @@ -29,8 +29,7 @@ protected function setUp() { $this->installSchema('file', ['file_usage']); $this->executeMigrations(['d6_node']); // This is required for the second import below. - $migration_plugin_manager = $this->getMigration(); - \Drupal::database()->truncate($migration_plugin_manager->createInstance('d6_node:story')->getIdMap()->mapTableName())->execute(); + \Drupal::database()->truncate($this->getMigration('d6_node:story')->getIdMap()->mapTableName())->execute(); } /** diff --git a/core/modules/taxonomy/src/Tests/Migrate/MigrateTaxonomyTermStubTest.php b/core/modules/taxonomy/src/Tests/Migrate/MigrateTaxonomyTermStubTest.php index 833b472..f30b0d0 100644 --- a/core/modules/taxonomy/src/Tests/Migrate/MigrateTaxonomyTermStubTest.php +++ b/core/modules/taxonomy/src/Tests/Migrate/MigrateTaxonomyTermStubTest.php @@ -101,7 +101,7 @@ public function testStubWithWeightMapping() { 'destination' => ['plugin' => 'entity:taxonomy_term'], 'migration_dependencies' => ['required' => ['vocabularies']], ]; - $term_migration = MigrationConfigDeriver::save('terms', $config, $this->getMigration(), $this->container->get('config.factory')); + $term_migration = MigrationConfigDeriver::save('terms', $config, $this->container->get('plugin.manager.migration'), $this->container->get('config.factory')); $term_executable = new MigrateExecutable($term_migration, $this); $term_executable->import(); // Load the referenced term, which should exist as a stub. diff --git a/core/modules/user/src/Tests/Migrate/d7/UserMigrationClassTest.php b/core/modules/user/src/Tests/Migrate/d7/UserMigrationClassTest.php index ac97596..e1a1e6c 100644 --- a/core/modules/user/src/Tests/Migrate/d7/UserMigrationClassTest.php +++ b/core/modules/user/src/Tests/Migrate/d7/UserMigrationClassTest.php @@ -21,8 +21,7 @@ class UserMigrationClassTest extends MigrateDrupal7TestBase { * process pipeline by the d6_profile_values builder. */ public function testClass() { - $migration = $this->getMigration() - ->createInstance('d7_user'); + $migration = $this->getMigration('d7_user'); /** @var \Drupal\migrate\Entity\MigrationInterface[] $migrations */ $this->assertIdentical('d7_user', $migration->id()); $process = $migration->getProcess();