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 @@ -189,8 +189,7 @@ protected function performUpgrade($register_errors = TRUE) { // Load the first update screen. - $update_url = $GLOBALS['base_url'] . '/core/update.php'; - $this->upgradeGet($update_url); + $this->getUpdatePhp(); if (!$this->assertResponse(200)) { throw new Exception('Initial GET to update.php did not return HTTP 200 status.'); } @@ -230,7 +229,7 @@ } // Check if there still are pending updates. - $this->drupalGet($update_url); + $this->getUpdatePhp(); $this->drupalPost(NULL, array(), t('Continue')); if (!$this->assertText(t('No pending updates.'), t('No pending updates at the end of the update process.'))) { throw new Exception('update.php still shows pending updates after execution.'); @@ -263,21 +262,16 @@ } /** - * Retrieves a Drupal 7 absolute path for upgrade. + * Gets update.php without calling url(). * - * This function does not call url() to prevent system_list() invocation - * before key_value table exists. - * - * @param $path - * Drupal path or URL to load into internal browser - * - * @return - * The retrieved HTML string, also available as $this->drupalGetContent() + * This function is necessary because drupalGet calls t() before the + * database is ready for that. */ protected function upgradeGet($path) { // We re-using a CURL connection here. If that connection still has certain // options set, it might change the GET into a POST. Make sure we clear out // previous options. + $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(); @@ -286,7 +280,7 @@ if ($new = $this->checkForMetaRefresh()) { $out = $new; } - $this->verbose('GET request to: ' . $path . + $this->verbose('GET request to: update.php' . '
Ending URL: ' . $this->getUrl() . '
' . $out); return $out;