function LocaleConfigSubscriberTest::assertNoConfigOverride

Same name in other branches
  1. 8.9.x core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php \Drupal\Tests\locale\Kernel\LocaleConfigSubscriberTest::assertNoConfigOverride()
  2. 10 core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php \Drupal\Tests\locale\Kernel\LocaleConfigSubscriberTest::assertNoConfigOverride()
  3. 11.x core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php \Drupal\Tests\locale\Kernel\LocaleConfigSubscriberTest::assertNoConfigOverride()

Ensures configuration override is not present anymore.

@internal

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 392

Class

LocaleConfigSubscriberTest
Tests that shipped configuration translations are updated correctly.

Namespace

Drupal\Tests\locale\Kernel

Code

protected function assertNoConfigOverride(string $config_name, string $langcode) : void {
    $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());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.