reverted: --- b/core/modules/system/lib/Drupal/system/Tests/Upgrade/SystemUpgradePathTest.php +++ a/core/modules/system/lib/Drupal/system/Tests/Upgrade/SystemUpgradePathTest.php @@ -80,10 +80,6 @@ 'page.front' => 'node', ); - // The upgrade path converts "install_profile" to the settings key - // "install_profile". - $this->assertEqual('minimal', $this->container->get('settings')->get('install_profile')); - $expected_config['user.settings'] = array( 'cancel_method' => 'user_cancel_reassign', ); diff -u b/core/modules/system/lib/Drupal/system/Tests/Upgrade/UpgradePathTestBase.php b/core/modules/system/lib/Drupal/system/Tests/Upgrade/UpgradePathTestBase.php --- b/core/modules/system/lib/Drupal/system/Tests/Upgrade/UpgradePathTestBase.php +++ b/core/modules/system/lib/Drupal/system/Tests/Upgrade/UpgradePathTestBase.php @@ -146,6 +146,20 @@ $this->pass('Finished loading the dump.'); + // Override $update_free_access in settings.php to allow the anonymous user + // to run updates. + $install_profile = unserialize(db_query('SELECT value FROM {variable} WHERE name = :name', array(':name' => 'install_profile'))->fetchField()); + $settings = array( + 'settings' => array( + 'install_profile' => (object) array( + 'value' => $install_profile, + 'required' => TRUE, + ), + ), + ); + $this->writeSettings($settings); + $this->settingsSet('install_profile', $install_profile); + // Ensure that the session is not written to the new environment and replace // the global $user session with uid 1 from the new test site. drupal_save_session(FALSE); @@ -162,19 +176,6 @@ // Restore necessary variables. $this->variable_set('site_mail', 'simpletest@example.com'); - // Override $update_free_access in settings.php to allow the anonymous user - // to run updates. - $old_variable = unserialize(db_query('SELECT value FROM {variable} WHERE name = :name', array(':name' => 'install_profile'))->fetchField()); - $settings = array( - 'settings' => array( - 'install_profile' => (object) array( - 'value' => $old_variable, - 'required' => TRUE, - ), - ) - ); - $this->writeSettings($settings); - drupal_set_time_limit($this->timeLimit); $this->setup = TRUE; } only in patch2: unchanged: --- a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php @@ -778,6 +778,22 @@ protected function setUp() { $this->settingsSet('cache', array('default' => 'cache.backend.memory')); $parameters = $this->installParameters(); install_drupal($parameters); + + // Set the install_profile so that web requests to the requests to the child + // site have the correct profile. + $settings = array( + 'settings' => array( + 'install_profile' => (object) array( + 'value' => $this->profile, + 'required' => TRUE, + ), + ), + ); + $this->writeSettings($settings); + // Override install profile in Settings to so the correct profile is used by + // tests. + $this->settingsSet('install_profile', $this->profile); + $this->settingsSet('cache', array()); $this->rebuildContainer();