class MigrateTaxonomyVocabularyTranslationTest
Same name in this branch
- 9 core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTranslationTest.php \Drupal\Tests\taxonomy\Kernel\Migrate\d7\MigrateTaxonomyVocabularyTranslationTest
Same name and namespace in other branches
- 11.x core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTranslationTest.php \Drupal\Tests\taxonomy\Kernel\Migrate\d6\MigrateTaxonomyVocabularyTranslationTest
- 11.x core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTranslationTest.php \Drupal\Tests\taxonomy\Kernel\Migrate\d7\MigrateTaxonomyVocabularyTranslationTest
- 10 core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTranslationTest.php \Drupal\Tests\taxonomy\Kernel\Migrate\d6\MigrateTaxonomyVocabularyTranslationTest
- 10 core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTranslationTest.php \Drupal\Tests\taxonomy\Kernel\Migrate\d7\MigrateTaxonomyVocabularyTranslationTest
- 8.9.x core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTranslationTest.php \Drupal\Tests\taxonomy\Kernel\Migrate\d6\MigrateTaxonomyVocabularyTranslationTest
- 8.9.x core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTranslationTest.php \Drupal\Tests\taxonomy\Kernel\Migrate\d7\MigrateTaxonomyVocabularyTranslationTest
Migrate taxonomy vocabularies to taxonomy.vocabulary.*.yml.
@group migrate_drupal_6
Hierarchy
- class \Drupal\KernelTests\KernelTestBase extends \Drupal\Core\DependencyInjection\ServiceProviderInterface uses \Drupal\KernelTests\AssertLegacyTrait, \Drupal\KernelTests\AssertContentTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\ExtensionListTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait implements \PHPUnit\Framework\TestCase
- class \Drupal\Tests\migrate\Kernel\MigrateTestBase extends \Drupal\migrate\MigrateMessageInterface implements \Drupal\KernelTests\KernelTestBase
- class \Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase implements \Drupal\Tests\migrate\Kernel\MigrateTestBase
- class \Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase uses \Drupal\Tests\migrate_drupal\Traits\NodeMigrateTypeTestTrait implements \Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase
- class \Drupal\Tests\taxonomy\Kernel\Migrate\d6\MigrateTaxonomyVocabularyTranslationTest implements \Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase
- class \Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase uses \Drupal\Tests\migrate_drupal\Traits\NodeMigrateTypeTestTrait implements \Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase
- class \Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase implements \Drupal\Tests\migrate\Kernel\MigrateTestBase
- class \Drupal\Tests\migrate\Kernel\MigrateTestBase extends \Drupal\migrate\MigrateMessageInterface implements \Drupal\KernelTests\KernelTestBase
Expanded class hierarchy of MigrateTaxonomyVocabularyTranslationTest
File
-
core/
modules/ taxonomy/ tests/ src/ Kernel/ Migrate/ d6/ MigrateTaxonomyVocabularyTranslationTest.php, line 12
Namespace
Drupal\Tests\taxonomy\Kernel\Migrate\d6View source
class MigrateTaxonomyVocabularyTranslationTest extends MigrateDrupal6TestBase {
/**
* {@inheritdoc}
*/
protected static $modules = [
'config_translation',
'language',
'taxonomy',
];
/**
* {@inheritdoc}
*/
protected function setUp() : void {
parent::setUp();
$this->executeMigrations([
'language',
'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('zu', 'taxonomy.vocabulary.vocabulary_1_i_0_');
$this->assertSame('zu - vocabulary 1 (i=0)', $config->get('name'));
$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_th');
$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'));
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.