function InstallerTranslationNonStandardFilenamesTest::prepareEnvironment
Same name in other branches
- 10 core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationNonStandardFilenamesTest.php \Drupal\FunctionalTests\Installer\InstallerTranslationNonStandardFilenamesTest::prepareEnvironment()
Overrides InstallerTranslationMultipleLanguageNonInteractiveTest::prepareEnvironment
File
-
core/
tests/ Drupal/ FunctionalTests/ Installer/ InstallerTranslationNonStandardFilenamesTest.php, line 19
Class
- InstallerTranslationNonStandardFilenamesTest
- Tests non-standard named translation files get imported during install.
Namespace
Drupal\FunctionalTests\InstallerCode
protected function prepareEnvironment() : void {
BrowserTestBase::prepareEnvironment();
// Place custom local translations in the translations directory.
mkdir(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE);
file_put_contents(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations/drupal.de.po', $this->getPo('de'));
file_put_contents(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations/drupal.es.po', $this->getPo('es'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.