From 95a0f85a8053e3c2bda56a204db243a2daa95aa7 Mon Sep 17 00:00:00 2001 From: Angie Byron <webchick@24967.no-reply.drupal.org> Date: Fri, 25 Dec 2009 10:30:07 +0000 Subject: [PATCH] #663992 by sun and carlos8f: Quit caching verbose testing debug output. --- modules/simpletest/drupal_web_test_case.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php index eb18ef4a4da3..b9cd243be717 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; } -- GitLab