You are here

protected function InstallerTranslationMultipleLanguageTest::setUpLanguage in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Installer/InstallerTranslationMultipleLanguageTest.php \Drupal\system\Tests\Installer\InstallerTranslationMultipleLanguageTest::setUpLanguage()

Installer step: Select language.

Overrides InstallerTestBase::setUpLanguage

1 call to InstallerTranslationMultipleLanguageTest::setUpLanguage()
InstallerTranslationMultipleLanguageForeignTest::setUpLanguage in core/modules/system/src/Tests/Installer/InstallerTranslationMultipleLanguageForeignTest.php
Installer step: Select language.
1 method overrides InstallerTranslationMultipleLanguageTest::setUpLanguage()
InstallerTranslationMultipleLanguageForeignTest::setUpLanguage in core/modules/system/src/Tests/Installer/InstallerTranslationMultipleLanguageForeignTest.php
Installer step: Select language.

File

core/modules/system/src/Tests/Installer/InstallerTranslationMultipleLanguageTest.php, line 29
Contains \Drupal\system\Tests\Installer\InstallerTranslationMultipleLanguageTest.

Class

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

Namespace

Drupal\system\Tests\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();
}