Commit d6688ebf authored by catch's avatar catch
Browse files

Issue #3021395 by quietone, alexpott:...

Issue #3021395 by quietone, alexpott: MigrateDrupalTestBase::migrateContent(['translations') does not migrate translations
parent c59f10b9
......@@ -21,6 +21,7 @@ class MigrateBlockContentTranslationTest extends MigrateDrupal7TestBase {
'book',
'block',
'comment',
'filter',
'forum',
'views',
'block_content',
......
......@@ -16,7 +16,13 @@ class MigrateUploadTest extends MigrateDrupal6TestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['language', 'menu_ui'];
public static $modules = [
'language',
'content_translation',
'menu_ui',
// Required for translation migrations.
'migrate_drupal_multilingual',
];
/**
* {@inheritdoc}
......
......@@ -180,6 +180,7 @@ protected function executeMigrations(array $ids) {
array_walk($ids, function ($id) use ($manager) {
// This is possibly a base plugin ID and we want to run all derivatives.
$instances = $manager->createInstances($id);
$this->assertNotEmpty($instances, sprintf("No migrations created for id '%s'.", $id));
array_walk($instances, [$this, 'executeMigration']);
});
}
......
......@@ -93,7 +93,7 @@ protected function migrateFields() {
* Extra things to include as part of the migrations. Values may be
* 'revisions' or 'translations'.
*/
protected function migrateContent($include = []) {
protected function migrateContent(array $include = []) {
if (in_array('translations', $include)) {
$this->executeMigrations(['language']);
}
......@@ -104,7 +104,7 @@ protected function migrateContent($include = []) {
$this->executeMigrations(['d6_node_settings', 'd6_node']);
if (in_array('translations', $include)) {
$this->executeMigrations(['translations']);
$this->executeMigrations(['d6_node_translation']);
}
if (in_array('revisions', $include)) {
$this->executeMigrations(['d6_node_revision']);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment