function MigrateLanguageContentTaxonomyVocabularySettingsTest::testLanguageContentTaxonomy

Same name in this branch
  1. 8.9.x core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentTaxonomyVocabularySettingsTest.php \Drupal\Tests\language\Kernel\Migrate\d6\MigrateLanguageContentTaxonomyVocabularySettingsTest::testLanguageContentTaxonomy()
Same name in other branches
  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()
  3. 10 core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentTaxonomyVocabularySettingsTest.php \Drupal\Tests\language\Kernel\Migrate\d6\MigrateLanguageContentTaxonomyVocabularySettingsTest::testLanguageContentTaxonomy()
  4. 10 core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentTaxonomyVocabularySettingsTest.php \Drupal\Tests\language\Kernel\Migrate\d7\MigrateLanguageContentTaxonomyVocabularySettingsTest::testLanguageContentTaxonomy()
  5. 10 core/modules/forum/tests/src/Kernel/Migrate/d7/MigrateLanguageContentTaxonomyVocabularySettingsTest.php \Drupal\Tests\forum\Kernel\Migrate\d7\MigrateLanguageContentTaxonomyVocabularySettingsTest::testLanguageContentTaxonomy()
  6. 11.x core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentTaxonomyVocabularySettingsTest.php \Drupal\Tests\language\Kernel\Migrate\d6\MigrateLanguageContentTaxonomyVocabularySettingsTest::testLanguageContentTaxonomy()
  7. 11.x core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentTaxonomyVocabularySettingsTest.php \Drupal\Tests\language\Kernel\Migrate\d7\MigrateLanguageContentTaxonomyVocabularySettingsTest::testLanguageContentTaxonomy()
  8. 11.x core/modules/forum/tests/src/Kernel/Migrate/d7/MigrateLanguageContentTaxonomyVocabularySettingsTest.php \Drupal\Tests\forum\Kernel\Migrate\d7\MigrateLanguageContentTaxonomyVocabularySettingsTest::testLanguageContentTaxonomy()

Tests migration of 18ntaxonomy vocabulary settings.

File

core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentTaxonomyVocabularySettingsTest.php, line 42

Class

MigrateLanguageContentTaxonomyVocabularySettingsTest
Tests migration of i18ntaxonomy vocabulary settings.

Namespace

Drupal\Tests\language\Kernel\Migrate\d7

Code

public function testLanguageContentTaxonomy() {
    $target_entity = 'taxonomy_term';
    // No multilingual options for terms, i18n_mode = 0.
    $this->assertLanguageContentSettings($target_entity, 'tags', LanguageInterface::LANGCODE_NOT_SPECIFIED, FALSE, [
        'enabled' => FALSE,
    ]);
    $this->assertLanguageContentSettings($target_entity, 'forums', LanguageInterface::LANGCODE_NOT_SPECIFIED, FALSE, [
        'enabled' => FALSE,
    ]);
    $this->assertLanguageContentSettings($target_entity, 'vocabulary_name_much_longer_th', LanguageInterface::LANGCODE_NOT_SPECIFIED, FALSE, [
        'enabled' => FALSE,
    ]);
    $this->assertLanguageContentSettings($target_entity, 'test_vocabulary', LanguageInterface::LANGCODE_NOT_SPECIFIED, FALSE, [
        'enabled' => FALSE,
    ]);
    // Localize, i18n_mode = 1.
    $this->assertLanguageContentSettings($target_entity, 'vocablocalized', LanguageInterface::LANGCODE_NOT_SPECIFIED, TRUE, [
        'enabled' => TRUE,
    ]);
    // Translate, i18n_mode = 4.
    $this->assertLanguageContentSettings($target_entity, 'vocabtranslate', LanguageInterface::LANGCODE_NOT_SPECIFIED, TRUE, [
        'enabled' => FALSE,
    ]);
    // Fixed language, i18n_mode = 2.
    $this->assertLanguageContentSettings($target_entity, 'vocabfixed', 'fr', FALSE, [
        'enabled' => FALSE,
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.