diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeDeriverTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeDeriverTest.php new file mode 100644 index 0000000..abce689 --- /dev/null +++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeDeriverTest.php @@ -0,0 +1,50 @@ +pluginManager = $this->container->get('plugin.manager.migration'); + } + + /** + * Test node translation migrations with translation disabled. + */ + public function testNoTranslations() { + // Without content_translation, there should be no translation migrations. + $migrations = $this->pluginManager->createInstances('d6_node_translation'); + $this->assertSame([], $migrations, + "No node translation migrations without content_translation"); + } + + /** + * Test node translation migrations with translation enabled. + */ + public function testTranslations() { + // With content_translation, there should be translation migrations for + // each content type. + $this->enableModules(['language', 'content_translation']); + $migrations = $this->pluginManager->createInstances('d6_node_translation'); + $this->assertArrayHasKey('d6_node_translation:story', $migrations, + "Node translation migrations exist after content_translation installed"); + } + +}