protected function UpgradePathTestBase::refreshVariables

Specialized refreshVariables().

Overrides WebTestBase::refreshVariables

3 calls to UpgradePathTestBase::refreshVariables()
BareMinimalNoConfigUpgradePathTest::refreshVariables in drupal/core/modules/system/lib/Drupal/system/Tests/Upgrade/BareMinimalNoConfigUpgradePathTest.php
Overrides \Drupal\system\Tests\Upgrade\UpgradePathTestBase::refreshVariables().
UpgradePathTestBase::getUpdatePhp in drupal/core/modules/system/lib/Drupal/system/Tests/Upgrade/UpgradePathTestBase.php
Gets update.php without calling url().
UpgradePathTestBase::performUpgrade in drupal/core/modules/system/lib/Drupal/system/Tests/Upgrade/UpgradePathTestBase.php
Perform the upgrade.
1 method overrides UpgradePathTestBase::refreshVariables()

File

drupal/core/modules/system/lib/Drupal/system/Tests/Upgrade/UpgradePathTestBase.php, line 209
Definition of Drupal\system\Tests\Upgrade\UpgradePathTestBase.

Class

UpgradePathTestBase
Perform end-to-end tests of the upgrade path.

Namespace

Drupal\system\Tests\Upgrade

Code

protected function refreshVariables() {

  // Refresh the variables only if the site was already upgraded.
  if ($this->upgradedSite) {
    global $conf;
    cache('bootstrap')
      ->delete('variables');
    $conf = variable_initialize();
    $container = drupal_container();
    if ($container
      ->has('config.factory')) {
      $container
        ->get('config.factory')
        ->reset();
    }
  }
}