diff options
author | David Rothstein <drothstein@gmail.com> | 2013-04-01 22:50:18 -0400 |
---|---|---|
committer | David Rothstein <drothstein@gmail.com> | 2013-04-01 22:50:18 -0400 |
commit | 7cbe4b7e265343773c2cd2e50b86c68182a64f8e (patch) | |
tree | 482c920dfba10c492cafb9f4aa84034086d56a56 /modules/simpletest/drupal_web_test_case.php | |
parent | de6e29d084adc900fa8c93510efa2679ce82abea (diff) | |
download | brdo-7cbe4b7e265343773c2cd2e50b86c68182a64f8e.tar.gz brdo-7cbe4b7e265343773c2cd2e50b86c68182a64f8e.tar.bz2 |
Issue #1693398 by donquixote, pounard, sun, Sylvain Lecoy: Allow PSR-0 test classes to be used in D7.
Diffstat (limited to 'modules/simpletest/drupal_web_test_case.php')
-rw-r--r-- | modules/simpletest/drupal_web_test_case.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php index a2cc484a2..0853c7d96 100644 --- a/modules/simpletest/drupal_web_test_case.php +++ b/modules/simpletest/drupal_web_test_case.php @@ -447,7 +447,8 @@ abstract class DrupalTestCase { */ protected function verbose($message) { if ($id = simpletest_verbose($message)) { - $url = file_create_url($this->originalFileDirectory . '/simpletest/verbose/' . get_class($this) . '-' . $id . '.html'); + $class_safe = str_replace('\\', '_', get_class($this)); + $url = file_create_url($this->originalFileDirectory . '/simpletest/verbose/' . $class_safe . '-' . $id . '.html'); $this->error(l(t('Verbose message'), $url, array('attributes' => array('target' => '_blank'))), 'User notice'); } } @@ -466,7 +467,8 @@ abstract class DrupalTestCase { */ public function run(array $methods = array()) { // Initialize verbose debugging. - simpletest_verbose(NULL, variable_get('file_public_path', conf_path() . '/files'), get_class($this)); + $class = get_class($this); + simpletest_verbose(NULL, variable_get('file_public_path', conf_path() . '/files'), str_replace('\\', '_', $class)); // HTTP auth settings (<username>:<password>) for the simpletest browser // when sending requests to the test site. @@ -478,7 +480,6 @@ abstract class DrupalTestCase { } set_error_handler(array($this, 'errorHandler')); - $class = get_class($this); // Iterate through all the methods in this class, unless a specific list of // methods to run was passed. $class_methods = get_class_methods($class); |