function LocaleUpdateBase::setUp
Same name in other branches
- 9 core/modules/locale/tests/src/Functional/LocaleUpdateBase.php \Drupal\Tests\locale\Functional\LocaleUpdateBase::setUp()
- 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()
Overrides BrowserTestBase::setUp
5 calls to LocaleUpdateBase::setUp()
- LocaleTranslationChangeProjectVersionTest::setUp in core/
modules/ locale/ tests/ src/ Functional/ LocaleTranslationChangeProjectVersionTest.php - 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
5 methods override LocaleUpdateBase::setUp()
- LocaleTranslationChangeProjectVersionTest::setUp in core/
modules/ locale/ tests/ src/ Functional/ LocaleTranslationChangeProjectVersionTest.php - 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 56
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 = \Drupal::time()->getRequestTime() - 300;
$this->timestampMedium = \Drupal::time()->getRequestTime() - 200;
$this->timestampNew = \Drupal::time()->getRequestTime() - 100;
$this->timestampNow = \Drupal::time()->getRequestTime();
// 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.