protected function LocaleConfigSubscriberTest::setUpNoTranslation in Drupal 10
Same name and namespace in other branches
- 8 core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php \Drupal\Tests\locale\Kernel\LocaleConfigSubscriberTest::setUpNoTranslation()
- 9 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.
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\KernelCode
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);
}