function LocaleThemeInstallTest::installParameters

Same name and namespace in other branches
  1. 11.x core/modules/locale/tests/src/Functional/LocaleThemeInstallTest.php \Drupal\Tests\locale\Functional\LocaleThemeInstallTest::installParameters()

File

core/modules/locale/tests/src/Functional/LocaleThemeInstallTest.php, line 35

Class

LocaleThemeInstallTest
Tests that locale rewrites config langcodes after theme install.

Namespace

Drupal\Tests\locale\Functional

Code

protected function installParameters() : array {
  $parameters = parent::installParameters();
  $parameters['parameters']['langcode'] = 'de';
  // Create a po file so we don't attempt to download one from
  // localize.drupal.org and to have a test translation that will not change.
  \Drupal::service('file_system')->mkdir($this->publicFilesDirectory . '/translations', NULL, TRUE);
  $contents = <<<PO
  msgid ""
  msgstr ""
  
  PO;
  file_put_contents($this->publicFilesDirectory . '/translations/drupal-' . \Drupal::VERSION . '.de.po', $contents);
  return $parameters;
}

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