You are here

protected function LocaleConfigSubscriberTest::assertActiveConfig in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/locale/src/Tests/LocaleConfigSubscriberTest.php \Drupal\locale\Tests\LocaleConfigSubscriberTest::assertActiveConfig()

Ensures configuration was saved correctly.

Parameters

string $config_name: The configuration name.

string $key: The configuration key.

string $value: The configuration value.

string $langcode: The language code.

Return value

bool TRUE if the assertion succeeded, FALSE otherwise.

3 calls to LocaleConfigSubscriberTest::assertActiveConfig()
LocaleConfigSubscriberForeignTest::saveLanguageActive in core/modules/locale/src/Tests/LocaleConfigSubscriberForeignTest.php
Saves a language override.
LocaleConfigSubscriberTest::saveLocaleTranslationData in core/modules/locale/src/Tests/LocaleConfigSubscriberTest.php
Saves translation data from locale module.
LocaleConfigSubscriberTest::setUpTranslation in core/modules/locale/src/Tests/LocaleConfigSubscriberTest.php
Sets up a configuration string with a translation.

File

core/modules/locale/src/Tests/LocaleConfigSubscriberTest.php, line 425
Contains \Drupal\locale\Tests\LocaleConfigSubscriberTest.

Class

LocaleConfigSubscriberTest
Tests that shipped configuration translations are updated correctly.

Namespace

Drupal\locale\Tests

Code

protected function assertActiveConfig($config_name, $key, $value, $langcode) {
  $config = $this->configFactory
    ->getEditable($config_name);
  return $this
    ->assertEqual($config
    ->get('langcode'), $langcode) && $this
    ->assertIdentical($config
    ->get($key), $value);
}