public function ConfigImportUITest::prepareSiteNameUpdate in Drupal 10
Same name and namespace in other branches
- 8 core/modules/config/tests/src/Functional/ConfigImportUITest.php \Drupal\Tests\config\Functional\ConfigImportUITest::prepareSiteNameUpdate()
- 9 core/modules/config/tests/src/Functional/ConfigImportUITest.php \Drupal\Tests\config\Functional\ConfigImportUITest::prepareSiteNameUpdate()
File
- core/
modules/ config/ tests/ src/ Functional/ ConfigImportUITest.php, line 395
Class
- ConfigImportUITest
- Tests the user interface for importing configuration.
Namespace
Drupal\Tests\config\FunctionalCode
public function prepareSiteNameUpdate($new_site_name) {
$sync = $this->container
->get('config.storage.sync');
// Create updated configuration object.
$config_data = $this
->config('system.site')
->get();
$config_data['name'] = $new_site_name;
$sync
->write('system.site', $config_data);
}