From 9ec469a0c651c3e0ebda50732b51ed1701bc999e Mon Sep 17 00:00:00 2001 From: catch Date: Mon, 30 Nov 2020 13:28:08 +0000 Subject: [PATCH] Issue #3138795 by quietone, sja112: d6_term_node_revision references non-existent migration --- core/misc/cspell/dictionary.txt | 1 - .../taxonomy/migrations/d6_term_node_revision.yml | 2 +- .../Kernel/Migrate/d6/MigrateTermNodeComplete.php | 12 ++++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/core/misc/cspell/dictionary.txt b/core/misc/cspell/dictionary.txt index 34ae8f307008..f98b8ecb5ed6 100644 --- a/core/misc/cspell/dictionary.txt +++ b/core/misc/cspell/dictionary.txt @@ -310,7 +310,6 @@ contrained contribs controlgroup coord -copmplete corefake coretest corge diff --git a/core/modules/taxonomy/migrations/d6_term_node_revision.yml b/core/modules/taxonomy/migrations/d6_term_node_revision.yml index 4b196ac2dfeb..b202994bf34e 100644 --- a/core/modules/taxonomy/migrations/d6_term_node_revision.yml +++ b/core/modules/taxonomy/migrations/d6_term_node_revision.yml @@ -12,7 +12,7 @@ process: - plugin: migration_lookup migration: - - d6_node_copmplete + - d6_node_complete - d6_node_revision source: vid - diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeComplete.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeComplete.php index 8d311f024e00..be2d04497648 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeComplete.php +++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeComplete.php @@ -64,4 +64,16 @@ class MigrateTermNodeComplete extends MigrateDrupal6TestBase { $this->assertSame('3', $node->field_vocabulary_2_i_1_[1]->target_id); } + /** + * Tests the Drupal 6 term-node association to Drupal 8 node revisions. + */ + public function testTermNodeRevision() { + $this->executeMigrations(['d6_term_node_revision']); + + $node = \Drupal::entityTypeManager()->getStorage('node')->loadRevision(2001); + $this->assertCount(2, $node->field_vocabulary_3_i_2_); + $this->assertSame('4', $node->field_vocabulary_3_i_2_[0]->target_id); + $this->assertSame('5', $node->field_vocabulary_3_i_2_[1]->target_id); + } + }