You are here

protected function LocaleConfigSubscriberTest::assertNoConfigOverride in Drupal 8

Same name and namespace in other branches
  1. 9 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
    ->assertNotEqual($config_langcode, $langcode);
  $this
    ->assertEqual($override
    ->isNew(), TRUE);
}