function ConfigImportUITest::prepareSiteNameUpdate

Same name and namespace in other branches
  1. 11.x core/modules/config/tests/src/Functional/ConfigImportUITest.php \Drupal\Tests\config\Functional\ConfigImportUITest::prepareSiteNameUpdate()

File

core/modules/config/tests/src/Functional/ConfigImportUITest.php, line 397

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.