You are here

protected function LocaleConfigSubscriberTest::setUpNoTranslation 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::setUpNoTranslation()

Sets up a configuration string without a translation.

The actual configuration is already available by installing locale_test module, as it is done in LocaleConfigSubscriberTest::setUp(). This sets up the necessary source string and verifies that everything is as expected to avoid false positives.

Parameters

string $config_name: The configuration name.

string $key: The configuration key.

string $source: The source string.

string $langcode: The language code.

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

File

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

Class

LocaleConfigSubscriberTest
Tests that shipped configuration translations are updated correctly.

Namespace

Drupal\Tests\locale\Kernel

Code

protected function setUpNoTranslation($config_name, $key, $source, $langcode) {
  $this->localeConfigManager
    ->updateConfigTranslations([
    $config_name,
  ], [
    $langcode,
  ]);
  $this
    ->assertNoConfigOverride($config_name, $key, $source, $langcode);
  $this
    ->assertNoTranslation($config_name, $langcode);
}