You are here

protected function VocabularyLanguageTest::setUp in Drupal 9

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

Overrides TaxonomyTestBase::setUp

File

core/modules/taxonomy/tests/src/Functional/VocabularyLanguageTest.php, line 22

Class

VocabularyLanguageTest
Tests the language functionality for vocabularies.

Namespace

Drupal\Tests\taxonomy\Functional

Code

protected function setUp() : void {
  parent::setUp();

  // Create an administrative user.
  $this
    ->drupalLogin($this
    ->drupalCreateUser([
    'administer taxonomy',
  ]));

  // Add some custom languages.
  ConfigurableLanguage::create([
    'id' => 'aa',
    'label' => $this
      ->randomMachineName(),
  ])
    ->save();
  ConfigurableLanguage::create([
    'id' => 'bb',
    'label' => $this
      ->randomMachineName(),
  ])
    ->save();
}