You are here

public function ConfigImportUITest::prepareSiteNameUpdate in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/config/tests/src/Functional/ConfigImportUITest.php \Drupal\Tests\config\Functional\ConfigImportUITest::prepareSiteNameUpdate()
4 calls to ConfigImportUITest::prepareSiteNameUpdate()
ConfigImportUITest::testBatchErrors in core/modules/config/tests/src/Functional/ConfigImportUITest.php
Tests that errors set in the batch and on the ConfigImporter are merged.
ConfigImportUITest::testImport in core/modules/config/tests/src/Functional/ConfigImportUITest.php
Tests importing configuration.
ConfigImportUITest::testImportLock in core/modules/config/tests/src/Functional/ConfigImportUITest.php
Tests concurrent importing of configuration.
ConfigImportUITest::testImportValidation in core/modules/config/tests/src/Functional/ConfigImportUITest.php
Tests that multiple validation errors are listed on the page.

File

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

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