private function LocaleUpdateTest::setTranslationsDirectory

Sets the value of the default translations directory.

Parameters

string $path: Path of the translations directory relative to the drupal installation directory.

2 calls to LocaleUpdateTest::setTranslationsDirectory()
LocaleUpdateTest::setTranslationFiles in drupal/core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateTest.php
Setup the environment containting local and remote translation files.
LocaleUpdateTest::testUpdateImportWithoutDirectory in drupal/core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateTest.php
Tests translation import without a translations directory.

File

drupal/core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateTest.php, line 85
Contains Drupal\locale\Tests\LocaleUpdateTest.

Class

LocaleUpdateTest
Tests for update translations.

Namespace

Drupal\locale\Tests

Code

private function setTranslationsDirectory($path) {
  $this->tranlations_directory = $path;
  file_prepare_directory($path, FILE_CREATE_DIRECTORY);
  config('locale.settings')
    ->set('translation.path', $path)
    ->save();
}