protected function LocaleUpdateBase::setUp in Drupal 9
Same name and namespace in other branches
- 8 core/modules/locale/tests/src/Functional/LocaleUpdateBase.php \Drupal\Tests\locale\Functional\LocaleUpdateBase::setUp()
Overrides BrowserTestBase::setUp
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();
}