3 namespace Drupal\Tests\node\Kernel\Migrate\d7;
5 use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
10 * @group migrate_drupal_7
12 class MigrateNodeDeriverTest extends MigrateDrupal7TestBase {
15 * The migration plugin manager.
17 * @var \Drupal\migrate\Plugin\MigrationPluginManagerInterface
19 protected $pluginManager;
24 public function setUp() {
26 $this->pluginManager = $this->container->get('plugin.manager.migration');
30 * Test node translation migrations with translation disabled.
32 public function testNoTranslations() {
33 // Without content_translation, there should be no translation migrations.
34 $migrations = $this->pluginManager->createInstances('d7_node_translation');
35 $this->assertSame([], $migrations,
36 "No node translation migrations without content_translation");
40 * Test node translation migrations with translation enabled.
42 public function testTranslations() {
43 // With content_translation, there should be translation migrations for
45 $this->enableModules(['language', 'content_translation', 'node', 'filter']);
46 $migrations = $this->pluginManager->createInstances('d7_node_translation');
47 $this->assertArrayHasKey('d7_node_translation:article', $migrations,
48 "Node translation migrations exist after content_translation installed");