Skip to content

Commit bc1923b

Browse files
author
Nathaniel Catchpole
committed
Issue #3021395 by quietone, alexpott: MigrateDrupalTestBase::migrateContent(['translations') does not migrate translations
(cherry picked from commit d6688eb)
1 parent 57adbf1 commit bc1923b

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockContentTranslationTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class MigrateBlockContentTranslationTest extends MigrateDrupal7TestBase {
2121
'book',
2222
'block',
2323
'comment',
24+
'filter',
2425
'forum',
2526
'views',
2627
'block_content',

modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@ class MigrateUploadTest extends MigrateDrupal6TestBase {
1616
/**
1717
* {@inheritdoc}
1818
*/
19-
public static $modules = ['language', 'menu_ui'];
19+
public static $modules = [
20+
'language',
21+
'content_translation',
22+
'menu_ui',
23+
// Required for translation migrations.
24+
'migrate_drupal_multilingual',
25+
];
2026

2127
/**
2228
* {@inheritdoc}

modules/migrate/tests/src/Kernel/MigrateTestBase.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ protected function executeMigrations(array $ids) {
180180
array_walk($ids, function ($id) use ($manager) {
181181
// This is possibly a base plugin ID and we want to run all derivatives.
182182
$instances = $manager->createInstances($id);
183+
$this->assertNotEmpty($instances, sprintf("No migrations created for id '%s'.", $id));
183184
array_walk($instances, [$this, 'executeMigration']);
184185
});
185186
}

modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ protected function migrateFields() {
9393
* Extra things to include as part of the migrations. Values may be
9494
* 'revisions' or 'translations'.
9595
*/
96-
protected function migrateContent($include = []) {
96+
protected function migrateContent(array $include = []) {
9797
if (in_array('translations', $include)) {
9898
$this->executeMigrations(['language']);
9999
}
@@ -104,7 +104,7 @@ protected function migrateContent($include = []) {
104104
$this->executeMigrations(['d6_node_settings', 'd6_node']);
105105

106106
if (in_array('translations', $include)) {
107-
$this->executeMigrations(['translations']);
107+
$this->executeMigrations(['d6_node_translation']);
108108
}
109109
if (in_array('revisions', $include)) {
110110
$this->executeMigrations(['d6_node_revision']);

0 commit comments

Comments
 (0)