You are here

protected function ContentTranslationTestBase::setUp in Drupal 9

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

Overrides BrowserTestBase::setUp

14 calls to ContentTranslationTestBase::setUp()
BlockContentTranslationUITest::setUp in core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php
CommentTranslationUITest::setUp in core/modules/comment/tests/src/Functional/CommentTranslationUITest.php
ContentTestTranslationUITest::setUp in core/modules/content_translation/tests/src/Functional/ContentTestTranslationUITest.php
ContentTranslationPendingRevisionTestBase::setUp in core/modules/content_translation/tests/src/Functional/ContentTranslationPendingRevisionTestBase.php
ContentTranslationSyncImageTest::setUp in core/modules/content_translation/tests/src/Functional/ContentTranslationSyncImageTest.php

... See full list

14 methods override ContentTranslationTestBase::setUp()
BlockContentTranslationUITest::setUp in core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php
CommentTranslationUITest::setUp in core/modules/comment/tests/src/Functional/CommentTranslationUITest.php
ContentTestTranslationUITest::setUp in core/modules/content_translation/tests/src/Functional/ContentTestTranslationUITest.php
ContentTranslationPendingRevisionTestBase::setUp in core/modules/content_translation/tests/src/Functional/ContentTranslationPendingRevisionTestBase.php
ContentTranslationSyncImageTest::setUp in core/modules/content_translation/tests/src/Functional/ContentTranslationSyncImageTest.php

... See full list

File

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

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