Skip to content
Snippets Groups Projects
Commit 2d796cf1 authored by catch's avatar catch
Browse files

Issue #1587196 by aspilicious: Fixed Simpletest can't handle namespaces when...

Issue #1587196 by aspilicious: Fixed Simpletest can't handle namespaces when creating verbose output.
parent 28011ee9
No related branches found
No related tags found
No related merge requests found
...@@ -454,7 +454,8 @@ protected function error($message = '', $group = 'Other', array $caller = NULL) ...@@ -454,7 +454,8 @@ protected function error($message = '', $group = 'Other', array $caller = NULL)
*/ */
protected function verbose($message) { protected function verbose($message) {
if ($id = simpletest_verbose($message)) { if ($id = simpletest_verbose($message)) {
$url = file_create_url($this->originalFileDirectory . '/simpletest/verbose/' . get_class($this) . '-' . $id . '.html'); $class = str_replace('\\', '_', get_class($this));
$url = file_create_url($this->originalFileDirectory . '/simpletest/verbose/' . $class . '-' . $id . '.html');
$this->error(l(t('Verbose message'), $url, array('attributes' => array('target' => '_blank'))), 'User notice'); $this->error(l(t('Verbose message'), $url, array('attributes' => array('target' => '_blank'))), 'User notice');
} }
} }
...@@ -473,7 +474,8 @@ protected function verbose($message) { ...@@ -473,7 +474,8 @@ protected function verbose($message) {
*/ */
public function run(array $methods = array()) { public function run(array $methods = array()) {
// Initialize verbose debugging. // 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 // HTTP auth settings (<username>:<password>) for the simpletest browser
// when sending requests to the test site. // when sending requests to the test site.
...@@ -485,7 +487,6 @@ public function run(array $methods = array()) { ...@@ -485,7 +487,6 @@ public function run(array $methods = array()) {
} }
set_error_handler(array($this, 'errorHandler')); set_error_handler(array($this, 'errorHandler'));
$class = get_class($this);
// Iterate through all the methods in this class, unless a specific list of // Iterate through all the methods in this class, unless a specific list of
// methods to run was passed. // methods to run was passed.
$class_methods = get_class_methods($class); $class_methods = get_class_methods($class);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment