You are here

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

Ensures configuration override is not present anymore.

Parameters

string $config_name: The configuration name.

string $langcode: The language code.

4 calls to LocaleConfigSubscriberTest::assertNoConfigOverride()
LocaleConfigSubscriberForeignTest::testEnglish in core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberForeignTest.php
Tests that adding English creates a translation override.
LocaleConfigSubscriberTest::deleteLanguageOverride in core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php
Deletes a language override.
LocaleConfigSubscriberTest::deleteLocaleTranslationData in core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php
Deletes translation data from locale module.
LocaleConfigSubscriberTest::setUpNoTranslation in core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php
Sets up a configuration string without a translation.

File

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

Class

LocaleConfigSubscriberTest
Tests that shipped configuration translations are updated correctly.

Namespace

Drupal\Tests\locale\Kernel

Code

protected function assertNoConfigOverride($config_name, $langcode) {
  $config_langcode = $this->configFactory
    ->getEditable($config_name)
    ->get('langcode');
  $override = $this->languageManager
    ->getLanguageConfigOverride($langcode, $config_name);
  $this
    ->assertNotEquals($langcode, $config_langcode);
  $this
    ->assertTrue($override
    ->isNew());
}