You are here

public function MigrateTaxonomyTermTranslationTest::testTranslatedTaxonomyTerms in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/content_translation/tests/src/Kernel/Migrate/d6/MigrateTaxonomyTermTranslationTest.php \Drupal\Tests\content_translation\Kernel\Migrate\d6\MigrateTaxonomyTermTranslationTest::testTranslatedTaxonomyTerms()

Tests the Drupal 6 i18n taxonomy term to Drupal 8 migration.

File

core/modules/content_translation/tests/src/Kernel/Migrate/d6/MigrateTaxonomyTermTranslationTest.php, line 121

Class

MigrateTaxonomyTermTranslationTest
Test migration of translated taxonomy terms.

Namespace

Drupal\Tests\content_translation\Kernel\Migrate\d6

Code

public function testTranslatedTaxonomyTerms() {
  $this
    ->assertEntity(1, 'zu', 'zu - term 1 of vocabulary 1', 'vocabulary_1_i_0_', 'zu - description of term 1 of vocabulary 1', NULL, '0', []);
  $this
    ->assertEntity(2, 'fr', 'fr - term 2 of vocabulary 2', 'vocabulary_2_i_1_', 'fr - description of term 2 of vocabulary 2', NULL, '3', []);
  $this
    ->assertEntity(3, 'fr', 'fr - term 3 of vocabulary 2', 'vocabulary_2_i_1_', 'fr - description of term 3 of vocabulary 2', NULL, '4', [
    '2',
  ]);
  $this
    ->assertEntity(4, 'en', 'term 4 of vocabulary 3', 'vocabulary_3_i_2_', 'description of term 4 of vocabulary 3', NULL, '6', []);
  $this
    ->assertEntity(5, 'en', 'term 5 of vocabulary 3', 'vocabulary_3_i_2_', 'description of term 5 of vocabulary 3', NULL, '7', [
    '4',
  ]);
  $this
    ->assertEntity(6, 'en', 'term 6 of vocabulary 3', 'vocabulary_3_i_2_', 'description of term 6 of vocabulary 3', NULL, '8', [
    '4',
    '5',
  ]);
  $this
    ->assertEntity(7, 'fr', 'fr - term 2 of vocabulary 1', 'vocabulary_1_i_0_', 'fr - desc of term 2 vocab 1', NULL, '0', []);
}