Loading core/modules/locale/locale.bulk.inc +5 −5 Original line number Diff line number Diff line Loading @@ -638,14 +638,14 @@ function locale_config_batch_set_config_langcodes(&$context) { * @see locale_config_batch_build() */ function locale_config_batch_refresh_name(array $names, array $langcodes, &$context) { if (!isset($context['result']['stats']['config'])) { $context['result']['stats']['config'] = 0; if (!isset($context['results']['stats']['config'])) { $context['results']['stats']['config'] = 0; } $context['result']['stats']['config'] += Locale::config()->updateConfigTranslations($names, $langcodes); $context['results']['stats']['config'] += Locale::config()->updateConfigTranslations($names, $langcodes); foreach ($names as $name) { $context['result']['names'][] = $name; $context['results']['names'][] = $name; } $context['result']['langcodes'] = $langcodes; $context['results']['langcodes'] = $langcodes; $context['finished'] = 1; } Loading core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigMultilingualTest.php +18 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,8 @@ namespace Drupal\FunctionalTests\Installer; use Drupal\Core\Logger\RfcLogLevel; /** * Verifies that installing from existing configuration works. * Loading @@ -21,4 +23,20 @@ protected function getConfigTarball() { return __DIR__ . '/../../../fixtures/config_install/multilingual.tar.gz'; } /** * {@inheritdoc} */ public function testConfigSync() { parent::testConfigSync(); // Ensure no warning, error, critical, alert or emergency messages have been // logged. $count = (int) \Drupal::database()->select('watchdog', 'w')->fields('w')->condition('severity', RfcLogLevel::WARNING, '<=')->countQuery()->execute()->fetchField(); $this->assertSame(0, $count); // Ensure the correct message is logged from locale_config_batch_finished(). $count = (int) \Drupal::database()->select('watchdog', 'w')->fields('w')->condition('message', 'The configuration was successfully updated. %number configuration objects updated.')->countQuery()->execute()->fetchField(); $this->assertSame(1, $count); } } Loading
core/modules/locale/locale.bulk.inc +5 −5 Original line number Diff line number Diff line Loading @@ -638,14 +638,14 @@ function locale_config_batch_set_config_langcodes(&$context) { * @see locale_config_batch_build() */ function locale_config_batch_refresh_name(array $names, array $langcodes, &$context) { if (!isset($context['result']['stats']['config'])) { $context['result']['stats']['config'] = 0; if (!isset($context['results']['stats']['config'])) { $context['results']['stats']['config'] = 0; } $context['result']['stats']['config'] += Locale::config()->updateConfigTranslations($names, $langcodes); $context['results']['stats']['config'] += Locale::config()->updateConfigTranslations($names, $langcodes); foreach ($names as $name) { $context['result']['names'][] = $name; $context['results']['names'][] = $name; } $context['result']['langcodes'] = $langcodes; $context['results']['langcodes'] = $langcodes; $context['finished'] = 1; } Loading
core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigMultilingualTest.php +18 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,8 @@ namespace Drupal\FunctionalTests\Installer; use Drupal\Core\Logger\RfcLogLevel; /** * Verifies that installing from existing configuration works. * Loading @@ -21,4 +23,20 @@ protected function getConfigTarball() { return __DIR__ . '/../../../fixtures/config_install/multilingual.tar.gz'; } /** * {@inheritdoc} */ public function testConfigSync() { parent::testConfigSync(); // Ensure no warning, error, critical, alert or emergency messages have been // logged. $count = (int) \Drupal::database()->select('watchdog', 'w')->fields('w')->condition('severity', RfcLogLevel::WARNING, '<=')->countQuery()->execute()->fetchField(); $this->assertSame(0, $count); // Ensure the correct message is logged from locale_config_batch_finished(). $count = (int) \Drupal::database()->select('watchdog', 'w')->fields('w')->condition('message', 'The configuration was successfully updated. %number configuration objects updated.')->countQuery()->execute()->fetchField(); $this->assertSame(1, $count); } }