You are here

public function MigrateLanguageContentTaxonomyVocabularySettingsTest::testLanguageContentTaxonomy in Drupal 9

Same name in this branch
  1. 9 core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentTaxonomyVocabularySettingsTest.php \Drupal\Tests\language\Kernel\Migrate\d6\MigrateLanguageContentTaxonomyVocabularySettingsTest::testLanguageContentTaxonomy()
  2. 9 core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentTaxonomyVocabularySettingsTest.php \Drupal\Tests\language\Kernel\Migrate\d7\MigrateLanguageContentTaxonomyVocabularySettingsTest::testLanguageContentTaxonomy()
Same name and namespace in other branches
  1. 8 core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentTaxonomyVocabularySettingsTest.php \Drupal\Tests\language\Kernel\Migrate\d6\MigrateLanguageContentTaxonomyVocabularySettingsTest::testLanguageContentTaxonomy()

Tests migration of 18ntaxonomy vocabulary settings.

File

core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentTaxonomyVocabularySettingsTest.php, line 41

Class

MigrateLanguageContentTaxonomyVocabularySettingsTest
Tests migration of i18ntaxonomy vocabulary settings.

Namespace

Drupal\Tests\language\Kernel\Migrate\d6

Code

public function testLanguageContentTaxonomy() {
  $target_entity = 'taxonomy_term';

  // Per Language.
  $this
    ->assertLanguageContentSettings($target_entity, 'vocabulary_1_i_0_', LanguageInterface::LANGCODE_SITE_DEFAULT, TRUE, [
    'enabled' => FALSE,
  ]);

  // Set language to vocabulary.
  $this
    ->assertLanguageContentSettings($target_entity, 'vocabulary_2_i_1_', 'fr', FALSE, [
    'enabled' => FALSE,
  ]);

  // Localize terms.
  $this
    ->assertLanguageContentSettings($target_entity, 'vocabulary_3_i_2_', LanguageInterface::LANGCODE_SITE_DEFAULT, TRUE, [
    'enabled' => FALSE,
  ]);

  // None translation enabled.
  $this
    ->assertLanguageContentSettings($target_entity, 'vocabulary_name_much_longer_th', LanguageInterface::LANGCODE_SITE_DEFAULT, TRUE, [
    'enabled' => TRUE,
  ]);
  $this
    ->assertLanguageContentSettings($target_entity, 'tags', LanguageInterface::LANGCODE_SITE_DEFAULT, FALSE, [
    'enabled' => FALSE,
  ]);
  $this
    ->assertLanguageContentSettings($target_entity, 'forums', LanguageInterface::LANGCODE_SITE_DEFAULT, FALSE, [
    'enabled' => FALSE,
  ]);
  $this
    ->assertLanguageContentSettings($target_entity, 'type', LanguageInterface::LANGCODE_SITE_DEFAULT, FALSE, [
    'enabled' => FALSE,
  ]);
}