X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fcore%2Fmodules%2Fnode%2Ftests%2Fsrc%2FKernel%2FMigrate%2Fd6%2FMigrateNodeDeriverTest.php;fp=web%2Fcore%2Fmodules%2Fnode%2Ftests%2Fsrc%2FKernel%2FMigrate%2Fd6%2FMigrateNodeDeriverTest.php;h=abce689755de8b16c0ed0e410c91779f1f030c05;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hp=0000000000000000000000000000000000000000;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad;p=yaffs-website diff --git a/web/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeDeriverTest.php b/web/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeDeriverTest.php new file mode 100644 index 000000000..abce68975 --- /dev/null +++ b/web/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"); + } + +}