function EntityTranslationTestBase::setUp

Sets up a Drupal site for running functional and integration tests.

Generates a random database prefix and installs Drupal with the specified installation profile in Drupal\simpletest\WebTestBase::$profile into the prefixed database. Afterwards, installs any additional modules specified by the test.

After installation all caches are flushed and several configuration values are reset to the values of the parent site executing the test, since the default values may be incompatible with the environment in which tests are being executed.

Parameters

...: List of modules to enable for the duration of the test. This can be either a single array or a variable number of string arguments.

Overrides WebTestBase::setUp

See also

Drupal\simpletest\WebTestBase::prepareDatabasePrefix()

Drupal\simpletest\WebTestBase::changeDatabasePrefix()

Drupal\simpletest\WebTestBase::prepareEnvironment()

10 calls to EntityTranslationTestBase::setUp()
CommentTranslationUITest::setUp in drupal/core/modules/comment/lib/Drupal/comment/Tests/CommentTranslationUITest.php
Sets up a Drupal site for running functional and integration tests.
ConfigTestTranslationUITest::setUp in drupal/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/ConfigTestTranslationUITest.php
Sets up a Drupal site for running functional and integration tests.
CustomBlockTranslationUITest::setUp in drupal/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockTranslationUITest.php
Overrides \Drupal\simpletest\WebTestBase::setUp().
EntityTestTranslationUITest::setUp in drupal/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTestTranslationUITest.php
Overrides \Drupal\simpletest\WebTestBase::setUp().
EntityTranslationSyncImageTest::setUp in drupal/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationSyncImageTest.php
Sets up a Drupal site for running functional and integration tests.

... See full list

10 methods override EntityTranslationTestBase::setUp()
CommentTranslationUITest::setUp in drupal/core/modules/comment/lib/Drupal/comment/Tests/CommentTranslationUITest.php
Sets up a Drupal site for running functional and integration tests.
ConfigTestTranslationUITest::setUp in drupal/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/ConfigTestTranslationUITest.php
Sets up a Drupal site for running functional and integration tests.
CustomBlockTranslationUITest::setUp in drupal/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockTranslationUITest.php
Overrides \Drupal\simpletest\WebTestBase::setUp().
EntityTestTranslationUITest::setUp in drupal/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTestTranslationUITest.php
Overrides \Drupal\simpletest\WebTestBase::setUp().
EntityTranslationSyncImageTest::setUp in drupal/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationSyncImageTest.php
Sets up a Drupal site for running functional and integration tests.

... See full list

File

drupal/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationTestBase.php, line 75
Contains \Drupal\entity\Tests\EntityTranslationTestBase.

Class

EntityTranslationTestBase
Tests entity translation workflows.

Namespace

Drupal\translation_entity\Tests

Code

function setUp() {
  parent::setUp();
  $this
    ->setupLanguages();
  $this
    ->setupBundle();
  $this
    ->enableTranslation();
  $this
    ->setupUsers();
  $this
    ->setupTestFields();
  $this->controller = translation_entity_controller($this->entityType);

  // Rebuild the container so that the new languages are picked up by services
  // that hold a list of languages.
  $this
    ->rebuildContainer();
}