function ContentTranslationTestBase::setUp

Same name in this branch
  1. 8.9.x core/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php \Drupal\Tests\content_translation\Functional\ContentTranslationTestBase::setUp()
Same name in other branches
  1. 9 core/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php \Drupal\Tests\content_translation\Functional\ContentTranslationTestBase::setUp()

Overrides WebTestBase::setUp

File

core/modules/content_translation/src/Tests/ContentTranslationTestBase.php, line 91

Class

ContentTranslationTestBase
Base class for content translation tests.

Namespace

Drupal\content_translation\Tests

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.