3 namespace Drupal\Tests\node\Kernel\Migrate\d6;
5 use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase;
10 * @group migrate_drupal_6
12 class MigrateNodeDeriverTest extends MigrateDrupal6TestBase {
14 * The migration plugin manager.
16 * @var \Drupal\migrate\Plugin\MigrationPluginManagerInterface
18 protected $pluginManager;
23 public function setUp() {
25 $this->pluginManager = $this->container->get('plugin.manager.migration');
29 * Test node translation migrations with translation disabled.
31 public function testNoTranslations() {
32 // Without content_translation, there should be no translation migrations.
33 $migrations = $this->pluginManager->createInstances('d6_node_translation');
34 $this->assertSame([], $migrations,
35 "No node translation migrations without content_translation");
39 * Test node translation migrations with translation enabled.
41 public function testTranslations() {
42 // With content_translation, there should be translation migrations for
44 $this->enableModules(['language', 'content_translation']);
45 $migrations = $this->pluginManager->createInstances('d6_node_translation');
46 $this->assertArrayHasKey('d6_node_translation:story', $migrations,
47 "Node translation migrations exist after content_translation installed");