diff --git a/core/modules/system/tests/upgrade/upgrade.test b/core/modules/system/tests/upgrade/upgrade.test index 52d7800..c644684 100644 --- a/core/modules/system/tests/upgrade/upgrade.test +++ b/core/modules/system/tests/upgrade/upgrade.test @@ -97,6 +97,15 @@ abstract class UpgradePathTestCase extends DrupalWebTestCase { file_prepare_directory($temp_files_directory, FILE_CREATE_DIRECTORY); $this->generatedTestFiles = FALSE; + // Create and set a new configuration directory and signature key. + // The child site automatically adjusts the global $config_directory_name to + // a test-prefix-specific directory within the public files directory. + // @see config_get_config_directory() + $GLOBALS['config_directory_name'] = 'simpletest/' . substr($this->databasePrefix, 10) . '/config'; + $this->configFileDirectory = $this->originalFileDirectory . '/' . $GLOBALS['config_directory_name']; + file_prepare_directory($this->configFileDirectory, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS); + $GLOBALS['config_signature_key'] = drupal_hash_base64(drupal_random_bytes(55)); + // Log fatal errors. ini_set('log_errors', 1); ini_set('error_log', $public_files_directory . '/error.log');