function LocaleUpdateBase::setUp
Same name in other branches
- 8.9.x core/modules/locale/tests/src/Functional/LocaleUpdateBase.php \Drupal\Tests\locale\Functional\LocaleUpdateBase::setUp()
- 10 core/modules/locale/tests/src/Functional/LocaleUpdateBase.php \Drupal\Tests\locale\Functional\LocaleUpdateBase::setUp()
- 11.x core/modules/locale/tests/src/Functional/LocaleUpdateBase.php \Drupal\Tests\locale\Functional\LocaleUpdateBase::setUp()
Overrides BrowserTestBase::setUp
4 calls to LocaleUpdateBase::setUp()
- LocaleTranslationDownloadTest::setUp in core/
modules/ locale/ tests/ src/ Functional/ LocaleTranslationDownloadTest.php - LocaleUpdateCronTest::setUp in core/
modules/ locale/ tests/ src/ Functional/ LocaleUpdateCronTest.php - LocaleUpdateInterfaceTest::setUp in core/
modules/ locale/ tests/ src/ Functional/ LocaleUpdateInterfaceTest.php - LocaleUpdateTest::setUp in core/
modules/ locale/ tests/ src/ Functional/ LocaleUpdateTest.php
4 methods override LocaleUpdateBase::setUp()
- LocaleTranslationDownloadTest::setUp in core/
modules/ locale/ tests/ src/ Functional/ LocaleTranslationDownloadTest.php - LocaleUpdateCronTest::setUp in core/
modules/ locale/ tests/ src/ Functional/ LocaleUpdateCronTest.php - LocaleUpdateInterfaceTest::setUp in core/
modules/ locale/ tests/ src/ Functional/ LocaleUpdateInterfaceTest.php - LocaleUpdateTest::setUp in core/
modules/ locale/ tests/ src/ Functional/ LocaleUpdateTest.php
File
-
core/
modules/ locale/ tests/ src/ Functional/ LocaleUpdateBase.php, line 55
Class
- LocaleUpdateBase
- Base class for testing updates to string translations.
Namespace
Drupal\Tests\locale\FunctionalCode
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)
->set('translation.use_source', LOCALE_TRANSLATION_USE_SOURCE_LOCAL)
->save();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.