commit 36e5ae87dca850e203ae21f86f34e7addd91de84
Author: Randy Fay <randy@randyfay.com>
Date:   Fri Jun 3 14:35:20 2011 -0600

    Issue #1120030 followup by rfay: Implications of using the 'real' simpletest

diff --git a/review/drupal/pifr_drupal.client.inc b/review/drupal/pifr_drupal.client.inc
index 70efd84..cf82163 100644
--- a/review/drupal/pifr_drupal.client.inc
+++ b/review/drupal/pifr_drupal.client.inc
@@ -187,18 +187,23 @@ class pifr_client_review_pifr_drupal extends pifr_client_review {
 
     // Step: Select an installation profile.
     // Step: Choose language.
-    $pofile = $this->test['review']['argument']['drupal.core.version'] == 6 ? 'default' : 'standard';
-    $html = $b->drupalGet('install.php', array('query' => 'profile=' . $pofile . '&locale=en'));
-    if (empty($html)) {
-      $this->set_error(array('@reason' => 'failed to run install.php with profile ' . $pofile));
+    $profile = $this->test['review']['argument']['drupal.core.version'] == 6 ? 'default' : 'standard';
+    $install_path = $base_url . '/install.php?profile=' . $profile . '&locale=en';
+    $html = $b->drupalGet($install_path);
+    $b->assertText(t('Database name'));
+    if (($b->results['#exception'] + $b->results['#fail']) != 0) {
+      $this->set_error(array('@reason' => 'Installing: failed to arrive at database configuration page using install path ' . $install_path));
       return;
     }
 
+
     // Step: Database configuration.
     $db_info = $this->database->get_information();
     $edit = array();
-    if ($b->xpath('//input[@name="driver"]')) {
+    if ($element = $b->xpath('//input[@name="driver" and not(@disabled)]')) {
       $edit['driver'] = pifr_client_review_database_type();
+      $this->log('Setting driver to ' . $edit['driver']);
+      $this->log('Element was ' . print_r($element, TRUE));
     }
 
     if ($this->arguments['drupal.core.version'] == 6) {
@@ -217,9 +222,11 @@ class pifr_client_review_pifr_drupal extends pifr_client_review {
       $edit['mysql[host]'] = $db_info['host'];
     }
 
-    $b->drupalPost(NULL, $edit, t('Save and continue'));
+    $b->drupalPost($install_path, $edit, t('Save and continue'));
 
     if (($b->results['#exception'] + $b->results['#fail']) != 0) {
+      $this->log("Error $edit used for database submission to $install_path: " . print_r($edit, TRUE));
+      $this->log("Error submitting database configuration: " . print_r($b->results, TRUE));
       $this->set_error(array('@reason' => 'Installing: failed to set database information (database name, user, password were wrong)'));
       return;
     }
@@ -238,7 +245,7 @@ class pifr_client_review_pifr_drupal extends pifr_client_review {
     $edit['account[pass][pass2]'] = $this->admin_password;
     $edit['update_status_module[1]'] = FALSE;
     // Call install.php with path again since browser will have messed up URL.
-    $b->drupalPost('install.php', $edit, t('Save and continue'), array('query' => 'profile=' . $pofile . '&locale=en'));
+    $b->drupalPost('install.php', $edit, t('Save and continue'), array('query' => 'profile=' . $profile . '&locale=en'));
 
     // Step: Finished.
     $b->assertText(t('Drupal installation complete'));
