You are here

function ConfigImportUITest::prepareSiteNameUpdate in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/config/src/Tests/ConfigImportUITest.php \Drupal\config\Tests\ConfigImportUITest::prepareSiteNameUpdate()
3 calls to ConfigImportUITest::prepareSiteNameUpdate()
ConfigImportUITest::testImport in core/modules/config/src/Tests/ConfigImportUITest.php
Tests importing configuration.
ConfigImportUITest::testImportLock in core/modules/config/src/Tests/ConfigImportUITest.php
Tests concurrent importing of configuration.
ConfigImportUITest::testImportValidation in core/modules/config/src/Tests/ConfigImportUITest.php
Tests that multiple validation errors are listed on the page.

File

core/modules/config/src/Tests/ConfigImportUITest.php, line 381
Contains \Drupal\config\Tests\ConfigImportUITest.

Class

ConfigImportUITest
Tests the user interface for importing/exporting configuration.

Namespace

Drupal\config\Tests

Code

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