diff --git a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
index 501af24..c8b4924 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
@@ -530,8 +530,15 @@ abstract class TestBase {
*/
public function run(array $methods = array()) {
$class = get_class($this);
- simpletest_verbose(NULL, config('system.file')->get('path.public'), str_replace('\\', '_', $class));
-
+ if (variable_get('simpletest_verbose', TRUE)) {
+ // Initialize verbose debugging.
+ $this->verbose = TRUE;
+ $this->verboseDirectory = config('system.file')->get('path.public') . '/simpletest/verbose';
+ if (file_prepare_directory($this->verboseDirectory, FILE_CREATE_DIRECTORY) && !file_exists($this->verboseDirectory . '/.htaccess')) {
+ file_put_contents($this->verboseDirectory . '/.htaccess', "\nExpiresActive Off\n\n");
+ }
+ $this->verboseClassName = str_replace("\\", "_", $class);
+ }
// HTTP auth settings (:) for the simpletest browser
// when sending requests to the test site.
$this->httpauth_method = variable_get('simpletest_httpauth_method', CURLAUTH_BASIC);