diff -u b/core/modules/config/lib/Drupal/config/Tests/ConfigImportUITest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigImportUITest.php --- b/core/modules/config/lib/Drupal/config/Tests/ConfigImportUITest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigImportUITest.php @@ -119,7 +119,7 @@ * Tests verification of site UUID before importing configuration. */ function testImportSiteUuidValidation() { - $staging = $this->container->get('config.storage.staging'); + $staging = \Drupal::service('config.storage.staging'); // Create updated configuration object. $config_data = \Drupal::config('system.site')->get(); // Generate a new site UUID. diff -u b/core/modules/config/lib/Drupal/config/Tests/ConfigImporterTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigImporterTest.php --- b/core/modules/config/lib/Drupal/config/Tests/ConfigImporterTest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigImporterTest.php @@ -100,7 +100,7 @@ * Tests verification of site UUID before importing configuration. */ function testSiteUuidValidate() { - $staging = $this->container->get('config.storage.staging'); + $staging = \Drupal::service('config.storage.staging'); // Create updated configuration object. $config_data = \Drupal::config('system.site')->get(); // Generate a new site UUID. diff -u b/core/modules/system/config/schema/system.schema.yml b/core/modules/system/config/schema/system.schema.yml --- b/core/modules/system/config/schema/system.schema.yml +++ b/core/modules/system/config/schema/system.schema.yml @@ -40,5 +40,4 @@ label: 'Site UUID' - system.maintenance: type: mapping only in patch2: unchanged: --- a/core/modules/config/lib/Drupal/config/Tests/ConfigExportImportUITest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigExportImportUITest.php @@ -42,6 +42,13 @@ class ConfigExportImportUITest extends WebTestBase { protected $admin_role; /** + * The site UUID. + * + * @var string + */ + protected $siteUuid; + + /** * Sort methods alphabetically in order to allow for a predictable sequence. */ const SORT_METHODS = TRUE; @@ -77,6 +84,7 @@ function testExport() { ->save(); $this->drupalPostForm('admin/config/development/configuration/full/export', array(), 'Export'); $this->tarball = $this->drupalGetContent(); + $this->siteUuid = \Drupal::config('system.site')->get('uuid'); } /** @@ -104,6 +112,8 @@ function testImport() { * The name of the tarball containing the configuration to be imported. */ protected function doImport($filename) { + // Ensure site uuids match so that import works. + \Drupal::config('system.site')->set('uuid', $this->siteUuid)->save(); $this->assertNotEqual($this->slogan, \Drupal::config('system.site')->get('slogan')); $this->drupalPostForm('admin/config/development/configuration/full/import', array('files[import_tarball]' => $filename), 'Upload'); $this->drupalPostForm(NULL, array(), 'Import all');