diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php index eb18ef4a4da388ac935d3d9565753d8700a50bf8..b9cd243be717cd4898415bcdce82eea024c49ba7 100644 --- a/modules/simpletest/drupal_web_test_case.php +++ b/modules/simpletest/drupal_web_test_case.php @@ -1426,7 +1426,7 @@ protected function drupalGet($path, array $options = array(), array $headers = a $this->refreshVariables(); // Ensure that any changes to variables in the other thread are picked up. // Replace original page output with new output from redirected page(s). - if (($new = $this->checkForMetaRefresh())) { + if ($new = $this->checkForMetaRefresh()) { $out = $new; } $this->verbose('GET request to: ' . $path . @@ -1501,7 +1501,7 @@ protected function drupalPost($path, $edit, $submit, array $options = array(), a $submit_matches = FALSE; $ajax = is_array($submit); if (isset($path)) { - $html = $this->drupalGet($path, $options); + $this->drupalGet($path, $options); } if ($this->parse()) { $edit_save = $edit; @@ -1554,7 +1554,7 @@ protected function drupalPost($path, $edit, $submit, array $options = array(), a $this->refreshVariables(); // Replace original page output with new output from redirected page(s). - if (($new = $this->checkForMetaRefresh())) { + if ($new = $this->checkForMetaRefresh()) { $out = $new; } $this->verbose('POST request to: ' . $path . @@ -2725,7 +2725,11 @@ function simpletest_verbose($message, $original_file_directory = NULL, $test_cla $class = $test_class; $verbose = variable_get('simpletest_verbose', FALSE); $directory = $file_directory . '/simpletest/verbose'; - return file_prepare_directory($directory, FILE_CREATE_DIRECTORY); + $writable = file_prepare_directory($directory, FILE_CREATE_DIRECTORY); + if ($writable && !file_exists($directory . '/.htaccess')) { + file_put_contents($directory . '/.htaccess', "<IfModule mod_expires.c>\nExpiresActive Off\n</IfModule>\n"); + } + return $writable; } return FALSE; }