You are here

protected function LocaleConfigSubscriberTest::setUpLocale in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php \Drupal\Tests\locale\Kernel\LocaleConfigSubscriberTest::setUpLocale()
  2. 10 core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php \Drupal\Tests\locale\Kernel\LocaleConfigSubscriberTest::setUpLocale()

Sets up the locale storage strings to be in line with configuration.

1 call to LocaleConfigSubscriberTest::setUpLocale()
LocaleConfigSubscriberTest::setUp in core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php
1 method overrides LocaleConfigSubscriberTest::setUpLocale()
LocaleConfigSubscriberForeignTest::setUpLocale in core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberForeignTest.php
Sets up the locale storage strings to be in line with configuration.

File

core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php, line 98

Class

LocaleConfigSubscriberTest
Tests that shipped configuration translations are updated correctly.

Namespace

Drupal\Tests\locale\Kernel

Code

protected function setUpLocale() {

  // Set up the locale database the same way we have in the config samples.
  $this
    ->setUpNoTranslation('locale_test.no_translation', 'test', 'Test', 'de');
  $this
    ->setUpTranslation('locale_test.translation', 'test', 'English test', 'German test', 'de');
  $this
    ->setUpTranslation('locale_test.translation_multiple', 'test', 'English test', 'German test', 'de');
}