You are here

protected function TermTranslationUITest::setupBundle in Drupal 9

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

Creates or initializes the bundle date if needed.

Overrides ContentTranslationTestBase::setupBundle

File

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

Class

TermTranslationUITest
Tests the Term Translation UI.

Namespace

Drupal\Tests\taxonomy\Functional

Code

protected function setupBundle() {
  parent::setupBundle();

  // Create a vocabulary.
  $this->vocabulary = Vocabulary::create([
    'name' => $this->bundle,
    'description' => $this
      ->randomMachineName(),
    'vid' => $this->bundle,
    'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
    'weight' => mt_rand(0, 10),
  ]);
  $this->vocabulary
    ->save();
}