/** @var \Drupal\Core\Config\StorageInterface $overridden_sync */
$overridden_sync =
$sync->
createCollection('language.fr'
);
$overridden_sync->
write('system.site',
['name' => 'French site name'
]);
// Before we start the import, the change to the site name should not be
// present. This action also primes the cache in the config factory so that
// we can test whether the cached data is correctly updated.
$config =
$this->
config('system.site'
);
$this->
assertNotEquals('English site name',
$config->
getRawData()['name'
]);
// Before the import is started the site name should not yet be overridden.
$this->
assertFalse($config->
hasOverrides());
$override =
$language_manager->
getLanguageConfigOverride('fr', 'system.site'
);
$this->
assertTrue($override->
isNew());
// Start the import of the new configuration.
$this->configImporter->
reset()->
import();
// Verify the new site name in the default language.
$config =
$this->
config('system.site'
)->
getRawData();
$this->
assertEquals('English site name',
$config['name'
]);
// Verify the overridden site name.