コード例 #1
0
 /**
  * Saves translation data from locale module.
  *
  * This will invoke LocaleConfigSubscriber through the event dispatcher. To
  * make sure the configuration was persisted correctly, the configuration
  * value is checked. Because LocaleConfigSubscriber temporarily disables the
  * override state of the configuration factory we check that the correct value
  * is restored afterwards.
  *
  * @param string $config_name
  *   The configuration name.
  * @param string $key
  *   The configuration key.
  * @param string $value
  *   The configuration value to save.
  */
 protected function saveLocaleTranslationData($config_name, $key, $value)
 {
     $this->localeConfigManager->saveTranslationData($config_name, $this->langcode, [$key => $value]);
     $this->configFactory->reset($config_name);
     $this->assertConfigValue($config_name, $key, $value);
 }