You are here

public function LocaleConfigSubscriberTest::testLocaleUpdateTranslation in Drupal 10

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

Tests updating community translations of shipped configuration.

File

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

Class

LocaleConfigSubscriberTest
Tests that shipped configuration translations are updated correctly.

Namespace

Drupal\Tests\locale\Kernel

Code

public function testLocaleUpdateTranslation() {
  $config_name = 'locale_test.translation';
  $this
    ->saveLocaleTranslationData($config_name, 'test', 'English test', 'Updated German test', 'de');
  $this
    ->assertTranslation($config_name, 'Updated German test', 'de', FALSE);
}