You are here

protected function InstallerTranslationMultipleLanguageTest::setUpLanguage in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageTest.php \Drupal\FunctionalTests\Installer\InstallerTranslationMultipleLanguageTest::setUpLanguage()
  2. 9 core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageTest.php \Drupal\FunctionalTests\Installer\InstallerTranslationMultipleLanguageTest::setUpLanguage()

Installer step: Select language.

Overrides InstallerTestBase::setUpLanguage

See also

\Drupal\Core\Installer\Form\SelectLanguageForm

1 call to InstallerTranslationMultipleLanguageTest::setUpLanguage()
InstallerTranslationMultipleLanguageForeignTest::setUpLanguage in core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageForeignTest.php
Installer step: Select language.
1 method overrides InstallerTranslationMultipleLanguageTest::setUpLanguage()
InstallerTranslationMultipleLanguageForeignTest::setUpLanguage in core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageForeignTest.php
Installer step: Select language.

File

core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageTest.php, line 27

Class

InstallerTranslationMultipleLanguageTest
Tests translation files for multiple languages get imported during install.

Namespace

Drupal\FunctionalTests\Installer

Code

protected function setUpLanguage() {

  // 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-8.0.0.de.po', $this
    ->getPo('de'));
  file_put_contents(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.es.po', $this
    ->getPo('es'));
  parent::setUpLanguage();
}