diff -u b/core/modules/taxonomy/migration_templates/d6_taxonomy_term_translation.yml b/core/modules/taxonomy/migration_templates/d6_taxonomy_term_translation.yml --- b/core/modules/taxonomy/migration_templates/d6_taxonomy_term_translation.yml +++ b/core/modules/taxonomy/migration_templates/d6_taxonomy_term_translation.yml @@ -3,7 +3,7 @@ migration_tags: - Drupal 6 source: - plugin: d6_i18n_taxonomy_term + plugin: d6_taxonomy_term_translation process: # If you are using this file to build a custom migration consider removing # the tid field to allow incremental migrations. reverted: --- b/core/modules/taxonomy/src/Plugin/migrate/source/d6/I18nTerm.php +++ /dev/null @@ -1,27 +0,0 @@ -t('The term language.'); - $fields['trid'] = $this->t('Not sure yet.'); - return $fields; - } - -} reverted: --- b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/I18nTermTest.php +++ /dev/null @@ -1,206 +0,0 @@ - 1, - 'vid' => 5, - 'name' => 'name value 1', - 'description' => 'description value 1', - 'weight' => 0, - 'language' => NULL, - 'trid' => 0, - ], - [ - 'tid' => 2, - 'vid' => 6, - 'name' => 'name value 2', - 'description' => 'description value 2', - 'weight' => 0, - 'language' => NULL, - 'trid' => 0, - ], - [ - 'tid' => 3, - 'vid' => 6, - 'name' => 'name value 3', - 'description' => 'description value 3', - 'weight' => 0, - 'language' => NULL, - 'trid' => 0, - ], - [ - 'tid' => 4, - 'vid' => 5, - 'name' => 'name value 4', - 'description' => 'description value 4', - 'weight' => 1, - 'language' => NULL, - 'trid' => 0, - ], - [ - 'tid' => 5, - 'vid' => 6, - 'name' => 'name value 5', - 'description' => 'description value 5', - 'weight' => 1, - 'language' => NULL, - 'trid' => 0, - ], - [ - 'tid' => 6, - 'vid' => 6, - 'name' => 'name value 6', - 'description' => 'description value 6', - 'weight' => 0, - 'language' => NULL, - 'trid' => 0, - ], - [ - 'tid' => 10, - 'vid' => 6, - 'name' => 'zu - name value 2', - 'description' => 'zu - description value 2', - 'weight' => 0, - 'language' => 'zu', - 'trid' => 0, - ], - ]; - $tests[0]['source_data']['term_hierarchy'] = [ - [ - 'tid' => 1, - 'parent' => 0, - ], - [ - 'tid' => 2, - 'parent' => 0, - ], - [ - 'tid' => 3, - 'parent' => 0, - ], - [ - 'tid' => 4, - 'parent' => 1, - ], - [ - 'tid' => 5, - 'parent' => 2, - ], - [ - 'tid' => 6, - 'parent' => 3, - ], - [ - 'tid' => 6, - 'parent' => 2, - ], - [ - 'tid' => 10, - 'parent' => 0, - ], - ]; - - // The expected results. - $tests[0]['expected_data'] = [ - [ - 'tid' => 1, - 'vid' => 5, - 'name' => 'name value 1', - 'description' => 'description value 1', - 'weight' => 0, - 'parent' => [0], - 'language' => NULL, - 'trid' => 0, - ], - [ - 'tid' => 10, - 'vid' => 6, - 'name' => 'zu - name value 2', - 'description' => 'zu - description value 2', - 'weight' => 0, - 'parent' => [0], - 'language' => 'zu', - 'trid' => 0, - ], - [ - 'tid' => 2, - 'vid' => 6, - 'name' => 'name value 2', - 'description' => 'description value 2', - 'weight' => 0, - 'parent' => [0], - 'language' => NULL, - 'trid' => 0, - ], - [ - 'tid' => 3, - 'vid' => 6, - 'name' => 'name value 3', - 'description' => 'description value 3', - 'weight' => 0, - 'parent' => [0], - 'language' => NULL, - 'trid' => 0, - ], - [ - 'tid' => 4, - 'vid' => 5, - 'name' => 'name value 4', - 'description' => 'description value 4', - 'weight' => 1, - 'parent' => [1], - 'language' => NULL, - 'trid' => 0, - ], - [ - 'tid' => 5, - 'vid' => 6, - 'name' => 'name value 5', - 'description' => 'description value 5', - 'weight' => 1, - 'parent' => [2], - 'language' => NULL, - 'trid' => 0, - ], - [ - 'tid' => 6, - 'vid' => 6, - 'name' => 'name value 6', - 'description' => 'description value 6', - 'weight' => 0, - 'parent' => [3, 2], - 'language' => NULL, - 'trid' => 0, - ], - ]; - - $tests[0]['expected_count'] = NULL; - - return $tests; - } - -} only in patch2: unchanged: --- /dev/null +++ b/core/modules/taxonomy/src/Plugin/migrate/source/d6/TermTranslation.php @@ -0,0 +1,27 @@ +t('The term language.'); + $fields['trid'] = $this->t('Not sure yet.'); + return $fields; + } + +} only in patch2: unchanged: --- /dev/null +++ b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermTranslationTest.php @@ -0,0 +1,206 @@ + 1, + 'vid' => 5, + 'name' => 'name value 1', + 'description' => 'description value 1', + 'weight' => 0, + 'language' => NULL, + 'trid' => 0, + ], + [ + 'tid' => 2, + 'vid' => 6, + 'name' => 'name value 2', + 'description' => 'description value 2', + 'weight' => 0, + 'language' => NULL, + 'trid' => 0, + ], + [ + 'tid' => 3, + 'vid' => 6, + 'name' => 'name value 3', + 'description' => 'description value 3', + 'weight' => 0, + 'language' => NULL, + 'trid' => 0, + ], + [ + 'tid' => 4, + 'vid' => 5, + 'name' => 'name value 4', + 'description' => 'description value 4', + 'weight' => 1, + 'language' => NULL, + 'trid' => 0, + ], + [ + 'tid' => 5, + 'vid' => 6, + 'name' => 'name value 5', + 'description' => 'description value 5', + 'weight' => 1, + 'language' => NULL, + 'trid' => 0, + ], + [ + 'tid' => 6, + 'vid' => 6, + 'name' => 'name value 6', + 'description' => 'description value 6', + 'weight' => 0, + 'language' => NULL, + 'trid' => 0, + ], + [ + 'tid' => 10, + 'vid' => 6, + 'name' => 'zu - name value 2', + 'description' => 'zu - description value 2', + 'weight' => 0, + 'language' => 'zu', + 'trid' => 0, + ], + ]; + $tests[0]['source_data']['term_hierarchy'] = [ + [ + 'tid' => 1, + 'parent' => 0, + ], + [ + 'tid' => 2, + 'parent' => 0, + ], + [ + 'tid' => 3, + 'parent' => 0, + ], + [ + 'tid' => 4, + 'parent' => 1, + ], + [ + 'tid' => 5, + 'parent' => 2, + ], + [ + 'tid' => 6, + 'parent' => 3, + ], + [ + 'tid' => 6, + 'parent' => 2, + ], + [ + 'tid' => 10, + 'parent' => 0, + ], + ]; + + // The expected results. + $tests[0]['expected_data'] = [ + [ + 'tid' => 1, + 'vid' => 5, + 'name' => 'name value 1', + 'description' => 'description value 1', + 'weight' => 0, + 'parent' => [0], + 'language' => NULL, + 'trid' => 0, + ], + [ + 'tid' => 10, + 'vid' => 6, + 'name' => 'zu - name value 2', + 'description' => 'zu - description value 2', + 'weight' => 0, + 'parent' => [0], + 'language' => 'zu', + 'trid' => 0, + ], + [ + 'tid' => 2, + 'vid' => 6, + 'name' => 'name value 2', + 'description' => 'description value 2', + 'weight' => 0, + 'parent' => [0], + 'language' => NULL, + 'trid' => 0, + ], + [ + 'tid' => 3, + 'vid' => 6, + 'name' => 'name value 3', + 'description' => 'description value 3', + 'weight' => 0, + 'parent' => [0], + 'language' => NULL, + 'trid' => 0, + ], + [ + 'tid' => 4, + 'vid' => 5, + 'name' => 'name value 4', + 'description' => 'description value 4', + 'weight' => 1, + 'parent' => [1], + 'language' => NULL, + 'trid' => 0, + ], + [ + 'tid' => 5, + 'vid' => 6, + 'name' => 'name value 5', + 'description' => 'description value 5', + 'weight' => 1, + 'parent' => [2], + 'language' => NULL, + 'trid' => 0, + ], + [ + 'tid' => 6, + 'vid' => 6, + 'name' => 'name value 6', + 'description' => 'description value 6', + 'weight' => 0, + 'parent' => [3, 2], + 'language' => NULL, + 'trid' => 0, + ], + ]; + + $tests[0]['expected_count'] = NULL; + + return $tests; + } + +}