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