You are here

protected function TaxonomyTranslationTestTrait::setupLanguages in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/taxonomy/tests/src/Functional/TaxonomyTranslationTestTrait.php \Drupal\Tests\taxonomy\Functional\TaxonomyTranslationTestTrait::setupLanguages()
  2. 9 core/modules/taxonomy/tests/src/Functional/TaxonomyTranslationTestTrait.php \Drupal\Tests\taxonomy\Functional\TaxonomyTranslationTestTrait::setupLanguages()

Adds additional languages.

File

core/modules/taxonomy/tests/src/Functional/TaxonomyTranslationTestTrait.php, line 55

Class

TaxonomyTranslationTestTrait
Provides common testing base for translated taxonomy terms.

Namespace

Drupal\Tests\taxonomy\Functional

Code

protected function setupLanguages() {
  ConfigurableLanguage::createFromLangcode($this->translateToLangcode)
    ->save();
  $this
    ->rebuildContainer();
}