MigrateNodeDeriverTest.php in Drupal 8
File
core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeDeriverTest.php
View source
<?php
namespace Drupal\Tests\node\Kernel\Migrate\d6;
use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase;
class MigrateNodeDeriverTest extends MigrateDrupal6TestBase {
protected $pluginManager;
public function setUp() {
parent::setUp();
$this->pluginManager = $this->container
->get('plugin.manager.migration');
}
public function testNoTranslations() {
$migrations = $this->pluginManager
->createInstances('d6_node_translation');
$this
->assertSame([], $migrations, "No node translation migrations without content_translation");
}
public function testTranslations() {
$this
->enableModules([
'language',
'content_translation',
]);
$this
->assertTrue($this->container
->get('plugin.manager.migration')
->hasDefinition('d6_node_translation:story'), "Node translation migrations exist after content_translation installed");
}
}