function ContentTranslationTestBase::setUp

1 method overrides ContentTranslationTestBase::setUp()
MediaTranslationUITest::setUp in core/modules/media/tests/src/Functional/MediaTranslationUITest.php

File

core/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php, line 88

Class

ContentTranslationTestBase
Base class for content translation tests.

Namespace

Drupal\Tests\content_translation\Functional

Code

protected function setUp() {
  parent::setUp();
  $this->setupLanguages();
  $this->setupBundle();
  $this->enableTranslation();
  $this->setupUsers();
  $this->setupTestFields();
  $this->manager = $this->container
    ->get('content_translation.manager');
  $this->controller = $this->manager
    ->getTranslationHandler($this->entityTypeId);
  // Rebuild the container so that the new languages are picked up by services
  // that hold a list of languages.
  $this->rebuildContainer();
}

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