function ContentTranslationTestBase::setUp

Same name in other branches
  1. 8.9.x core/modules/content_translation/src/Tests/ContentTranslationTestBase.php \Drupal\content_translation\Tests\ContentTranslationTestBase::setUp()
  2. 8.9.x 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 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.