X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Ftaxonomy%2Ftests%2Fsrc%2FKernel%2FMigrate%2Fd6%2FMigrateTaxonomyVocabularyTranslationTest.php;fp=web%2Fcore%2Fmodules%2Ftaxonomy%2Ftests%2Fsrc%2FKernel%2FMigrate%2Fd6%2FMigrateTaxonomyVocabularyTranslationTest.php;h=3993abb98fbeef4fbc327f6d4f0e5e3898f0dadb;hp=0000000000000000000000000000000000000000;hb=bfbba508964731508b9bd6d5835c2edc858db95b;hpb=cb9a80db11fc6b014e5b1e693a5a391c95eb5d9a diff --git a/web/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTranslationTest.php b/web/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTranslationTest.php new file mode 100644 index 000000000..3993abb98 --- /dev/null +++ b/web/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTranslationTest.php @@ -0,0 +1,47 @@ +executeMigrations([ + 'd6_taxonomy_vocabulary', + 'd6_taxonomy_vocabulary_translation', + ]); + } + + /** + * Tests the Drupal 6 i18n taxonomy vocabularies to Drupal 8 migration. + */ + public function testTaxonomyVocabularyTranslation() { + $language_manager = \Drupal::service('language_manager'); + $config = $language_manager->getLanguageConfigOverride('fr', 'taxonomy.vocabulary.vocabulary_1_i_0_'); + $this->assertSame('fr - vocabulary 1 (i=0)', $config->get('name')); + $config = $language_manager->getLanguageConfigOverride('fr', 'taxonomy.vocabulary.vocabulary_2_i_1_'); + $this->assertSame('fr - vocabulary 2 (i=1)', $config->get('name')); + $config = $language_manager->getLanguageConfigOverride('fr', 'taxonomy.vocabulary.vocabulary_3_i_2_'); + $this->assertSame('fr - vocabulary 3 (i=2)', $config->get('name')); + $config = $language_manager->getLanguageConfigOverride('fr', 'taxonomy.vocabulary.vocabulary_name_much_longer_than'); + $this->assertSame('Nom de vocabulaire beaucoup plus long que trente-deux caractères', $config->get('name')); + $config = $language_manager->getLanguageConfigOverride('fr', 'taxonomy.vocabulary.tags'); + $this->assertSame('fr - Tags', $config->get('name')); + } + +}