summaryrefslogtreecommitdiffstats
path: root/core/modules/migrate_drupal
diff options
context:
space:
mode:
authorNathaniel Catchpole2018-03-30 11:28:25 (GMT)
committerNathaniel Catchpole2018-03-30 11:28:25 (GMT)
commitd43ad76618694e08a568c6604425840c280b3af4 (patch)
tree7b7b9811d91da38f26f484c0d2bcc72a718907a1 /core/modules/migrate_drupal
parent7d0b699e5662ed934635ea4e161fc99f08d0f7b3 (diff)
Issue #2912353 by maxocub, alexpott, heddn, phenaproxima, quietone: Handle menu_items related to Drupal 6 and 7 node translations with different IDs
Diffstat (limited to 'core/modules/migrate_drupal')
-rw-r--r--core/modules/migrate_drupal/tests/fixtures/drupal6.php108
-rw-r--r--core/modules/migrate_drupal/tests/fixtures/drupal7.php108
-rw-r--r--core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6AuditIdsTest.php1
-rw-r--r--core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7AuditIdsTest.php1
4 files changed, 218 insertions, 0 deletions
diff --git a/core/modules/migrate_drupal/tests/fixtures/drupal6.php b/core/modules/migrate_drupal/tests/fixtures/drupal6.php
index de20137..ea4eee6 100644
--- a/core/modules/migrate_drupal/tests/fixtures/drupal6.php
+++ b/core/modules/migrate_drupal/tests/fixtures/drupal6.php
@@ -33719,6 +33719,114 @@ $connection->insert('menu_links')
'p9' => '0',
'updated' => '0',
))
+->values(array(
+ 'menu_name' => 'primary-links',
+ 'mlid' => '459',
+ 'plid' => '0',
+ 'link_path' => 'node/10',
+ 'router_path' => 'node/%',
+ 'link_title' => 'The Real McCoy',
+ 'options' => 'a:2:{s:10:"attributes";a:1:{s:5:"title";s:0:"";}s:5:"alter";b:1;}',
+ 'module' => 'menu',
+ 'hidden' => '0',
+ 'external' => '0',
+ 'has_children' => '0',
+ 'expanded' => '0',
+ 'weight' => '0',
+ 'depth' => '1',
+ 'customized' => '1',
+ 'p1' => '459',
+ 'p2' => '0',
+ 'p3' => '0',
+ 'p4' => '0',
+ 'p5' => '0',
+ 'p6' => '0',
+ 'p7' => '0',
+ 'p8' => '0',
+ 'p9' => '0',
+ 'updated' => '0',
+))
+->values(array(
+ 'menu_name' => 'primary-links',
+ 'mlid' => '460',
+ 'plid' => '0',
+ 'link_path' => 'node/11',
+ 'router_path' => 'node/%',
+ 'link_title' => 'Le Vrai McCoy',
+ 'options' => 'a:2:{s:10:"attributes";a:1:{s:5:"title";s:0:"";}s:5:"alter";b:1;}',
+ 'module' => 'menu',
+ 'hidden' => '0',
+ 'external' => '0',
+ 'has_children' => '0',
+ 'expanded' => '0',
+ 'weight' => '0',
+ 'depth' => '1',
+ 'customized' => '1',
+ 'p1' => '460',
+ 'p2' => '0',
+ 'p3' => '0',
+ 'p4' => '0',
+ 'p5' => '0',
+ 'p6' => '0',
+ 'p7' => '0',
+ 'p8' => '0',
+ 'p9' => '0',
+ 'updated' => '0',
+))
+->values(array(
+ 'menu_name' => 'primary-links',
+ 'mlid' => '461',
+ 'plid' => '0',
+ 'link_path' => 'node/12',
+ 'router_path' => 'node/%',
+ 'link_title' => 'Abantu zulu',
+ 'options' => 'a:2:{s:10:"attributes";a:1:{s:5:"title";s:0:"";}s:5:"alter";b:1;}',
+ 'module' => 'menu',
+ 'hidden' => '0',
+ 'external' => '0',
+ 'has_children' => '0',
+ 'expanded' => '0',
+ 'weight' => '0',
+ 'depth' => '1',
+ 'customized' => '1',
+ 'p1' => '461',
+ 'p2' => '0',
+ 'p3' => '0',
+ 'p4' => '0',
+ 'p5' => '0',
+ 'p6' => '0',
+ 'p7' => '0',
+ 'p8' => '0',
+ 'p9' => '0',
+ 'updated' => '0',
+))
+->values(array(
+ 'menu_name' => 'primary-links',
+ 'mlid' => '462',
+ 'plid' => '0',
+ 'link_path' => 'node/13',
+ 'router_path' => 'node/%',
+ 'link_title' => 'The Zulu People',
+ 'options' => 'a:2:{s:10:"attributes";a:1:{s:5:"title";s:0:"";}s:5:"alter";b:1;}',
+ 'module' => 'menu',
+ 'hidden' => '0',
+ 'external' => '0',
+ 'has_children' => '0',
+ 'expanded' => '0',
+ 'weight' => '0',
+ 'depth' => '1',
+ 'customized' => '1',
+ 'p1' => '462',
+ 'p2' => '0',
+ 'p3' => '0',
+ 'p4' => '0',
+ 'p5' => '0',
+ 'p6' => '0',
+ 'p7' => '0',
+ 'p8' => '0',
+ 'p9' => '0',
+ 'updated' => '0',
+))
->execute();
$connection->schema()->createTable('menu_router', array(
diff --git a/core/modules/migrate_drupal/tests/fixtures/drupal7.php b/core/modules/migrate_drupal/tests/fixtures/drupal7.php
index 85362b3..23dd81e 100644
--- a/core/modules/migrate_drupal/tests/fixtures/drupal7.php
+++ b/core/modules/migrate_drupal/tests/fixtures/drupal7.php
@@ -23330,6 +23330,114 @@ $connection->insert('menu_links')
'p9' => '0',
'updated' => '0',
))
+->values(array(
+ 'menu_name' => 'navigation',
+ 'mlid' => '484',
+ 'plid' => '0',
+ 'link_path' => 'node/2',
+ 'router_path' => 'node/%',
+ 'link_title' => 'The thing about Deep Space 9',
+ 'options' => 'a:1:{s:10:"attributes";a:1:{s:5:"title";s:0:"";}}',
+ 'module' => 'menu',
+ 'hidden' => '0',
+ 'external' => '0',
+ 'has_children' => '0',
+ 'expanded' => '0',
+ 'weight' => '9',
+ 'depth' => '1',
+ 'customized' => '1',
+ 'p1' => '484',
+ 'p2' => '0',
+ 'p3' => '0',
+ 'p4' => '0',
+ 'p5' => '0',
+ 'p6' => '0',
+ 'p7' => '0',
+ 'p8' => '0',
+ 'p9' => '0',
+ 'updated' => '0',
+))
+->values(array(
+ 'menu_name' => 'navigation',
+ 'mlid' => '485',
+ 'plid' => '0',
+ 'link_path' => 'node/3',
+ 'router_path' => 'node/%',
+ 'link_title' => 'is - The thing about Deep Space 9',
+ 'options' => 'a:1:{s:10:"attributes";a:1:{s:5:"title";s:0:"";}}',
+ 'module' => 'menu',
+ 'hidden' => '0',
+ 'external' => '0',
+ 'has_children' => '0',
+ 'expanded' => '0',
+ 'weight' => '10',
+ 'depth' => '1',
+ 'customized' => '1',
+ 'p1' => '485',
+ 'p2' => '0',
+ 'p3' => '0',
+ 'p4' => '0',
+ 'p5' => '0',
+ 'p6' => '0',
+ 'p7' => '0',
+ 'p8' => '0',
+ 'p9' => '0',
+ 'updated' => '0',
+))
+->values(array(
+ 'menu_name' => 'navigation',
+ 'mlid' => '486',
+ 'plid' => '0',
+ 'link_path' => 'node/4',
+ 'router_path' => 'node/%',
+ 'link_title' => 'is - The thing about Firefly',
+ 'options' => 'a:1:{s:10:"attributes";a:1:{s:5:"title";s:0:"";}}',
+ 'module' => 'menu',
+ 'hidden' => '0',
+ 'external' => '0',
+ 'has_children' => '0',
+ 'expanded' => '0',
+ 'weight' => '11',
+ 'depth' => '1',
+ 'customized' => '1',
+ 'p1' => '486',
+ 'p2' => '0',
+ 'p3' => '0',
+ 'p4' => '0',
+ 'p5' => '0',
+ 'p6' => '0',
+ 'p7' => '0',
+ 'p8' => '0',
+ 'p9' => '0',
+ 'updated' => '0',
+))
+->values(array(
+ 'menu_name' => 'navigation',
+ 'mlid' => '487',
+ 'plid' => '0',
+ 'link_path' => 'node/5',
+ 'router_path' => 'node/%',
+ 'link_title' => 'en - The thing about Firefly',
+ 'options' => 'a:1:{s:10:"attributes";a:1:{s:5:"title";s:0:"";}}',
+ 'module' => 'menu',
+ 'hidden' => '0',
+ 'external' => '0',
+ 'has_children' => '0',
+ 'expanded' => '0',
+ 'weight' => '12',
+ 'depth' => '1',
+ 'customized' => '1',
+ 'p1' => '487',
+ 'p2' => '0',
+ 'p3' => '0',
+ 'p4' => '0',
+ 'p5' => '0',
+ 'p6' => '0',
+ 'p7' => '0',
+ 'p8' => '0',
+ 'p9' => '0',
+ 'updated' => '0',
+))
->execute();
$connection->schema()->createTable('menu_router', array(
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6AuditIdsTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6AuditIdsTest.php
index bee030e..a8e6a14 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6AuditIdsTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6AuditIdsTest.php
@@ -138,6 +138,7 @@ class MigrateDrupal6AuditIdsTest extends MigrateDrupal6TestBase {
'd6_taxonomy_term',
'd6_term_node_revision',
'd6_user',
+ 'node_translation_menu_links',
];
$this->assertEmpty(array_diff(array_filter($conflicts), $expected));
}
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7AuditIdsTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7AuditIdsTest.php
index d12445b..9c9db46 100644
--- a/core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7AuditIdsTest.php
+++ b/core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7AuditIdsTest.php
@@ -137,6 +137,7 @@ class MigrateDrupal7AuditIdsTest extends MigrateDrupal7TestBase {
'd7_node_revision',
'd7_taxonomy_term',
'd7_user',
+ 'node_translation_menu_links',
];
$this->assertEmpty(array_diff(array_filter($conflicts), $expected));
}