diff --git a/core/modules/system/lib/Drupal/system/Tests/Upgrade/UpgradePathTestBase.php b/core/modules/system/lib/Drupal/system/Tests/Upgrade/UpgradePathTestBase.php index dd6703b..aaa3464 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Upgrade/UpgradePathTestBase.php +++ b/core/modules/system/lib/Drupal/system/Tests/Upgrade/UpgradePathTestBase.php @@ -181,7 +181,7 @@ protected function variable_set($name, $value) { */ protected function refreshVariables() { // No operation if the child has not been upgraded yet. - if (!$this->upgradedSite) { + if ($this->upgradedSite) { global $conf; cache('bootstrap')->delete('variables'); $conf = variable_initialize(); @@ -263,6 +263,9 @@ protected function performUpgrade($register_errors = TRUE) { // of the child site directly from this request. $this->upgradedSite = TRUE; + // Force a variable refresh as we only just enabled it. + $this->refreshVariables(); + // Reload module list for modules that are enabled in the test database // but not on the test client. system_list_reset();