diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-12-18 06:36:00 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-12-18 06:36:00 +0000 |
commit | 104d6197a8affe1bfdbe6565686aabf531bd455b (patch) | |
tree | bf2b93c4b52cb1995397ee60d107789e805a8686 /modules/simpletest/tests/upgrade/upgrade.test | |
parent | 7eb6f7cb44c084c2a75fba80ba1bd0244f8ced6d (diff) | |
download | brdo-104d6197a8affe1bfdbe6565686aabf531bd455b.tar.gz brdo-104d6197a8affe1bfdbe6565686aabf531bd455b.tar.bz2 |
#945112 by carlos8f, dalin, David_Rothstein: Fixed Unable to stay logged in during upgrade from D6 -> D7
Diffstat (limited to 'modules/simpletest/tests/upgrade/upgrade.test')
-rw-r--r-- | modules/simpletest/tests/upgrade/upgrade.test | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/simpletest/tests/upgrade/upgrade.test b/modules/simpletest/tests/upgrade/upgrade.test index 8ea93deba..0b48db507 100644 --- a/modules/simpletest/tests/upgrade/upgrade.test +++ b/modules/simpletest/tests/upgrade/upgrade.test @@ -34,6 +34,9 @@ abstract class UpgradePathTestCase extends DrupalWebTestCase { protected function setUp() { global $user, $language, $conf; + // Load the Update API. + require_once DRUPAL_ROOT . '/includes/update.inc'; + // Reset flags. $this->upgradedSite = FALSE; $this->upgradeErrors = array(); @@ -106,10 +109,11 @@ abstract class UpgradePathTestCase extends DrupalWebTestCase { drupal_save_session(FALSE); $user = db_query('SELECT * FROM {users} WHERE uid = :uid', array(':uid' => 1))->fetchObject(); - // Generate and set a session cookie. + // Generate and set a D6-compatible session cookie. $this->curlInitialize(); $sid = drupal_hash_base64(uniqid(mt_rand(), TRUE) . drupal_random_bytes(55)); - curl_setopt($this->curlHandle, CURLOPT_COOKIE, rawurlencode($this->session_name) . '=' . rawurlencode($sid)); + $session_name = update_get_d6_session_name(); + curl_setopt($this->curlHandle, CURLOPT_COOKIE, rawurlencode($session_name) . '=' . rawurlencode($sid)); // Force our way into the session of the child site. drupal_save_session(TRUE); |