You are here

protected function LocaleUpdateBase::setUp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/locale/src/Tests/LocaleUpdateBase.php \Drupal\locale\Tests\LocaleUpdateBase::setUp()

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

Installs Drupal with the installation profile specified in \Drupal\simpletest\WebTestBase::$profile into the prefixed database.

Afterwards, installs any additional modules specified in the static \Drupal\simpletest\WebTestBase::$modules property of each class in the class hierarchy.

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.

Overrides WebTestBase::setUp

3 calls to LocaleUpdateBase::setUp()
LocaleUpdateCronTest::setUp in core/modules/locale/src/Tests/LocaleUpdateCronTest.php
Sets up a Drupal site for running functional and integration tests.
LocaleUpdateInterfaceTest::setUp in core/modules/locale/src/Tests/LocaleUpdateInterfaceTest.php
Sets up a Drupal site for running functional and integration tests.
LocaleUpdateTest::setUp in core/modules/locale/src/Tests/LocaleUpdateTest.php
Sets up a Drupal site for running functional and integration tests.
3 methods override LocaleUpdateBase::setUp()
LocaleUpdateCronTest::setUp in core/modules/locale/src/Tests/LocaleUpdateCronTest.php
Sets up a Drupal site for running functional and integration tests.
LocaleUpdateInterfaceTest::setUp in core/modules/locale/src/Tests/LocaleUpdateInterfaceTest.php
Sets up a Drupal site for running functional and integration tests.
LocaleUpdateTest::setUp in core/modules/locale/src/Tests/LocaleUpdateTest.php
Sets up a Drupal site for running functional and integration tests.

File

core/modules/locale/src/Tests/LocaleUpdateBase.php, line 57
Contains \Drupal\locale\Tests\LocaleUpdateBase.

Class

LocaleUpdateBase
Base class for testing updates to string translations.

Namespace

Drupal\locale\Tests

Code

protected function setUp() {
  parent::setUp();

  // Setup timestamps to identify old and new translation sources.
  $this->timestampOld = REQUEST_TIME - 300;
  $this->timestampMedium = REQUEST_TIME - 200;
  $this->timestampNew = REQUEST_TIME - 100;
  $this->timestampNow = REQUEST_TIME;

  // Enable import of translations. By default this is disabled for automated
  // tests.
  $this
    ->config('locale.settings')
    ->set('translation.import_enabled', TRUE)
    ->save();
}