function InstallerTranslationMultipleLanguageTest::setUpLanguage

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

Overrides InstallerTestBase::setUpLanguage

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();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.