You are here

public function ConfigImportUITest::prepareSiteNameUpdate in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/config/tests/src/Functional/ConfigImportUITest.php \Drupal\Tests\config\Functional\ConfigImportUITest::prepareSiteNameUpdate()
  2. 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\Functional

Code

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);
}