function ConfigImportCommandTest::prepareSiteNameUpdate
Prepares a site name update by modifying the synchronized configuration.
See also
\Drupal\Tests\config\Functional\ConfigImportUITest::prepareSiteNameUpdate()
File
-
core/
tests/ Drupal/ FunctionalTests/ Core/ Config/ ConfigImportCommandTest.php, line 410
Class
- ConfigImportCommandTest
- Tests the 'config:import' command.
Namespace
Drupal\FunctionalTests\Core\ConfigCode
private function prepareSiteNameUpdate(string $new_site_name) : void {
$sync = $this->container
->get('config.storage.sync');
$config_data = $this->config('system.site')
->get();
$config_data['name'] = $new_site_name;
$sync->write('system.site', $config_data);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.