protected function UpgradePathTestBase::getUpdatePhp

Gets update.php without calling url().

Required since WebTestBase::drupalGet() calls t(), which calls into system_list(), from the parent site/test runner, before update.php is even executed.

See also

WebTestBase::drupalGet()

1 call to UpgradePathTestBase::getUpdatePhp()
UpgradePathTestBase::performUpgrade in drupal/core/modules/system/lib/Drupal/system/Tests/Upgrade/UpgradePathTestBase.php
Perform the upgrade.

File

drupal/core/modules/system/lib/Drupal/system/Tests/Upgrade/UpgradePathTestBase.php, line 265
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 getUpdatePhp() {
  $path = $GLOBALS['base_url'] . '/core/update.php';
  $out = $this
    ->curlExec(array(
    CURLOPT_HTTPGET => TRUE,
    CURLOPT_URL => $path,
    CURLOPT_NOBODY => FALSE,
  ));

  // Ensure that any changes to variables in the other thread are picked up.
  $this
    ->refreshVariables();

  // Replace original page output with new output from redirected page(s).
  if ($new = $this
    ->checkForMetaRefresh()) {
    $out = $new;
  }
  $this
    ->verbose('GET request to: ' . $path . '<hr />Ending URL: ' . $this
    ->getUrl() . '<hr />' . $out);
  return $out;
}