function TaxonomyTranslationTestTrait::setupLanguages

Same name in other branches
  1. 9 core/modules/taxonomy/tests/src/Functional/TaxonomyTranslationTestTrait.php \Drupal\Tests\taxonomy\Functional\TaxonomyTranslationTestTrait::setupLanguages()
  2. 8.9.x core/modules/taxonomy/src/Tests/TaxonomyTranslationTestTrait.php \Drupal\taxonomy\Tests\TaxonomyTranslationTestTrait::setupLanguages()
  3. 8.9.x core/modules/taxonomy/tests/src/Functional/TaxonomyTranslationTestTrait.php \Drupal\Tests\taxonomy\Functional\TaxonomyTranslationTestTrait::setupLanguages()
  4. 10 core/modules/taxonomy/tests/src/Functional/TaxonomyTranslationTestTrait.php \Drupal\Tests\taxonomy\Functional\TaxonomyTranslationTestTrait::setupLanguages()

Adds additional languages.

3 calls to TaxonomyTranslationTestTrait::setupLanguages()
TermTranslationFieldViewTest::setUp in core/modules/taxonomy/tests/src/Functional/TermTranslationFieldViewTest.php
TermTranslationTest::setUp in core/modules/taxonomy/tests/src/Functional/TermTranslationTest.php
TermTranslationViewsTest::setUp in core/modules/taxonomy/tests/src/Functional/Views/TermTranslationViewsTest.php

File

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

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();
}

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