function VocabularyTranslationTest::setUp

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

Overrides TaxonomyTestBase::setUp

File

core/modules/taxonomy/tests/src/Functional/VocabularyTranslationTest.php, line 40

Class

VocabularyTranslationTest
Tests content translation for vocabularies.

Namespace

Drupal\Tests\taxonomy\Functional

Code

protected function setUp() : void {
    parent::setUp();
    // Create an administrative user.
    $this->drupalLogin($this->drupalCreateUser([
        'administer taxonomy',
        'administer content translation',
        'translate configuration',
    ]));
    // Add languages.
    foreach ($this->additionalLangcodes as $langcode) {
        ConfigurableLanguage::createFromLangcode($langcode)->save();
    }
}

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