function LocaleConfigSubscriberTest::testCreateTranslationMultiValue
Same name in other branches
- 9 core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php \Drupal\Tests\locale\Kernel\LocaleConfigSubscriberTest::testCreateTranslationMultiValue()
- 8.9.x core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php \Drupal\Tests\locale\Kernel\LocaleConfigSubscriberTest::testCreateTranslationMultiValue()
- 10 core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php \Drupal\Tests\locale\Kernel\LocaleConfigSubscriberTest::testCreateTranslationMultiValue()
Tests creating translations configuration with multi value settings.
File
-
core/
modules/ locale/ tests/ src/ Kernel/ LocaleConfigSubscriberTest.php, line 120
Class
- LocaleConfigSubscriberTest
- Tests that shipped configuration translations are updated correctly.
Namespace
Drupal\Tests\locale\KernelCode
public function testCreateTranslationMultiValue() : void {
$config_name = 'locale_test.translation_multiple';
$this->saveLanguageOverride($config_name, 'test_multiple', [
'string' => 'String (German)',
'another_string' => 'Another string (German)',
], 'de');
$this->saveLanguageOverride($config_name, 'test_after_multiple', [
'string' => 'After string (German)',
'another_string' => 'After another string (German)',
], 'de');
$strings = $this->stringStorage
->getTranslations([
'type' => 'configuration',
'name' => $config_name,
'language' => 'de',
'translated' => TRUE,
]);
$this->assertCount(5, $strings);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.