function LocaleTranslationDownloadTest::setUp
Same name in other branches
- 9 core/modules/locale/tests/src/Functional/LocaleTranslationDownloadTest.php \Drupal\Tests\locale\Functional\LocaleTranslationDownloadTest::setUp()
- 8.9.x core/modules/locale/tests/src/Functional/LocaleTranslationDownloadTest.php \Drupal\Tests\locale\Functional\LocaleTranslationDownloadTest::setUp()
- 11.x core/modules/locale/tests/src/Functional/LocaleTranslationDownloadTest.php \Drupal\Tests\locale\Functional\LocaleTranslationDownloadTest::setUp()
Overrides LocaleUpdateBase::setUp
File
-
core/
modules/ locale/ tests/ src/ Functional/ LocaleTranslationDownloadTest.php, line 33
Class
- LocaleTranslationDownloadTest
- Tests locale translation download.
Namespace
Drupal\Tests\locale\FunctionalCode
protected function setUp() : void {
parent::setUp();
$moduleHandler = $this->container
->get('module_handler');
$moduleHandler->loadInclude('locale', 'inc', 'locale.batch');
ConfigurableLanguage::createFromLangcode('de')->save();
// Let the translations:// stream wrapper point to a virtual file system to
// make it independent from the test environment.
$this->translationsStream = vfsStream::setup('translations');
\Drupal::configFactory()->getEditable('locale.settings')
->set('translation.path', $this->translationsStream
->url())
->save();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.