diff -u b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php --- b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php @@ -477,24 +477,19 @@ * methods during debugging. */ public function run(array $methods = array()) { - $simpletest_config = config('simpletest.settings'); - // Initialize verbose debugging. $class = get_class($this); simpletest_verbose(NULL, variable_get('file_public_path', conf_path() . '/files'), str_replace('\\', '_', $class)); // HTTP auth settings (:) for the simpletest browser // when sending requests to the test site. - $this->httpauth_method = (int) $simpletest_config->get('httpauth.method'); - $username = $simpletest_config->get('httpauth.username'); - $password = $simpletest_config->get('httpauth.password'); - if (!empty($username) && !empty($password)) { + $this->httpauth_method = variable_get('simpletest_httpauth_method', CURLAUTH_BASIC); + $username = variable_get('simpletest_httpauth_username', NULL); + $password = variable_get('simpletest_httpauth_password', NULL); + if ($username && $password) { $this->httpauth_credentials = $username . ':' . $password; } - // Maximum redirects setting for the simpletest browser. - $this->maximumRedirects = $simpletest_config->get('maximum_redirects'); - set_error_handler(array($this, 'errorHandler')); // Iterate through all the methods in this class, unless a specific list of // methods to run was passed. @@ -522,8 +517,10 @@ * methods during debugging. */ public function run(array $methods = array()) { + $simpletest_config = config('simpletest.settings'); + $class = get_class($this); - if (variable_get('simpletest_verbose', TRUE)) { + if ($simpletest_config->get('verbose')) { // Initialize verbose debugging. $this->verbose = TRUE; $this->verboseDirectory = variable_get('file_public_path', conf_path() . '/files') . '/simpletest/verbose'; @@ -534,13 +531,16 @@ } // HTTP auth settings (:) for the simpletest browser // when sending requests to the test site. - $this->httpauth_method = variable_get('simpletest_httpauth_method', CURLAUTH_BASIC); - $username = variable_get('simpletest_httpauth_username', NULL); - $password = variable_get('simpletest_httpauth_password', NULL); - if ($username && $password) { + $this->httpauth_method = (int) $simpletest_config->get('httpauth.method'); + $username = $simpletest_config->get('httpauth.username'); + $password = $simpletest_config->get('httpauth.password'); + if (!empty($username) && !empty($password)) { $this->httpauth_credentials = $username . ':' . $password; } + // Maximum redirects setting for the simpletest browser. + $this->maximumRedirects = $simpletest_config->get('maximum_redirects'); + set_error_handler(array($this, 'errorHandler')); // Iterate through all the methods in this class, unless a specific list of // methods to run was passed. diff -u b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php --- b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php @@ -910,14 +910,14 @@ // to prevent fragments being sent to the web server as part // of the request. // TODO: Remove this for Drupal 8, since fixed in curl 7.20.0. - if (in_array($status, array(300, 301, 302, 303, 305, 307)) && $this->redirect_count < $this->maximumRedirects) { + if (in_array($status, array(300, 301, 302, 303, 305, 307)) && $this->redirect_count < variable_get('simpletest_maximum_redirects', 5)) { if ($this->drupalGetHeader('location')) { $this->redirect_count++; $curl_options = array(); // to prevent fragments being sent to the web server as part // of the request. // TODO: Remove this for Drupal 8, since fixed in curl 7.20.0. - if (in_array($status, array(300, 301, 302, 303, 305, 307)) && $this->redirect_count < variable_get('simpletest_maximum_redirects', 5)) { + if (in_array($status, array(300, 301, 302, 303, 305, 307)) && $this->redirect_count < $this->maximumRedirects) { if ($this->drupalGetHeader('location')) { $this->redirect_count++; $curl_options = array(); diff -u b/core/modules/simpletest/simpletest.module b/core/modules/simpletest/simpletest.module --- b/core/modules/simpletest/simpletest.module +++ b/core/modules/simpletest/simpletest.module @@ -604,7 +604,7 @@ if ($original_file_directory) { $file_directory = $original_file_directory; $class = $test_class; - $verbose = config('simpletest.settings')->get('verbose'); + $verbose = variable_get('simpletest_verbose', TRUE); $directory = $file_directory . '/simpletest/verbose'; $writable = file_prepare_directory($directory, FILE_CREATE_DIRECTORY); if ($writable && !file_exists($directory . '/.htaccess')) {