You are here

public function LocaleConfigSubscriberForeignTest::testLocaleDeleteActiveTranslation in Drupal 10

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

Tests deleting community translations of shipped configuration.

File

core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberForeignTest.php, line 113

Class

LocaleConfigSubscriberForeignTest
Tests default configuration handling with a foreign default language.

Namespace

Drupal\Tests\locale\Kernel

Code

public function testLocaleDeleteActiveTranslation() {
  $config_name = 'locale_test.translation';
  $this
    ->deleteLocaleTranslationData($config_name, 'test', 'English test', 'hu');

  // Deleting the locale translation should not change active config.
  $this
    ->assertEquals('Hungarian test', $this->configFactory
    ->getEditable($config_name)
    ->get('test'));
}