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