function TermTranslationUITest::setupBundle

Same name and namespace in other branches
  1. 9 core/modules/taxonomy/tests/src/Functional/TermTranslationUITest.php \Drupal\Tests\taxonomy\Functional\TermTranslationUITest::setupBundle()
  2. 10 core/modules/taxonomy/tests/src/Functional/TermTranslationUITest.php \Drupal\Tests\taxonomy\Functional\TermTranslationUITest::setupBundle()
  3. 11.x core/modules/taxonomy/tests/src/Functional/TermTranslationUITest.php \Drupal\Tests\taxonomy\Functional\TermTranslationUITest::setupBundle()

Overrides ContentTranslationTestBase::setupBundle

File

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

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

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