function UmamiMultilingualInstallTest::setUpLanguage

Same name in other branches
  1. 9 core/profiles/demo_umami/tests/src/Functional/UmamiMultilingualInstallTest.php \Drupal\Tests\demo_umami\Functional\UmamiMultilingualInstallTest::setUpLanguage()
  2. 8.9.x core/profiles/demo_umami/tests/src/Functional/UmamiMultilingualInstallTest.php \Drupal\Tests\demo_umami\Functional\UmamiMultilingualInstallTest::setUpLanguage()
  3. 11.x core/profiles/demo_umami/tests/src/Functional/UmamiMultilingualInstallTest.php \Drupal\Tests\demo_umami\Functional\UmamiMultilingualInstallTest::setUpLanguage()

Overrides InstallerTestBase::setUpLanguage

File

core/profiles/demo_umami/tests/src/Functional/UmamiMultilingualInstallTest.php, line 38

Class

UmamiMultilingualInstallTest
Tests the multilingual installer installing the Umami profile.

Namespace

Drupal\Tests\demo_umami\Functional

Code

protected function setUpLanguage() {
    // Place custom local translations in the translations directory to avoid
    // getting translations from localize.drupal.org.
    mkdir(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE);
    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.