summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorNathaniel Catchpole2019-01-21 11:35:48 (GMT)
committerNathaniel Catchpole2019-01-21 11:35:59 (GMT)
commit1aa356a198d7af1a777cda28144e78ecbdee09d3 (patch)
tree9aaaaa0c2a0bb1681f8483326cd975f8ac4b6dcc /core
parentf49330eaae74f965f819f2943905094bd3035ec5 (diff)
Issue #3021395 by quietone, alexpott: MigrateDrupalTestBase::migrateContent(['translations') does not migrate translations
(cherry picked from commit d6688ebf3c536178531ff01959057f1c4dc1785d)
Diffstat (limited to 'core')
-rw-r--r--core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockContentTranslationTest.php1
-rw-r--r--core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadTest.php8
-rw-r--r--core/modules/migrate/tests/src/Kernel/MigrateTestBase.php1
-rw-r--r--core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php4
4 files changed, 11 insertions, 3 deletions
diff --git a/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockContentTranslationTest.php b/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockContentTranslationTest.php
index 0d082a8..374d061 100644
--- a/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockContentTranslationTest.php
+++ b/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockContentTranslationTest.php
@@ -21,6 +21,7 @@ class MigrateBlockContentTranslationTest extends MigrateDrupal7TestBase {
'book',
'block',
'comment',
+ 'filter',
'forum',
'views',
'block_content',
diff --git a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadTest.php b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadTest.php
index b807503..338d757 100644
--- a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadTest.php
+++ b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadTest.php
@@ -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}
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php b/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php
index 51e61d4..117b3e1 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php
@@ -180,6 +180,7 @@ abstract class MigrateTestBase extends KernelTestBase implements MigrateMessageI
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']);
});
}
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php b/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php
index 3a9467e..0b2735c 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php
@@ -93,7 +93,7 @@ abstract class MigrateDrupal6TestBase extends MigrateDrupalTestBase {
* 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 @@ abstract class MigrateDrupal6TestBase extends MigrateDrupalTestBase {
$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']);