From 8b86d0da84570d3f6d461a502b94bedc2f91889e Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Sat, 15 Aug 2009 06:20:20 +0000 Subject: #296574 by boombatower and chx: Provide debug function for debugging during tests and elsewhere. --- modules/simpletest/drupal_web_test_case.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'modules/simpletest/drupal_web_test_case.php') diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php index 5bb6c51a9..ad27ac258 100644 --- a/modules/simpletest/drupal_web_test_case.php +++ b/modules/simpletest/drupal_web_test_case.php @@ -42,6 +42,7 @@ abstract class DrupalTestCase { '#pass' => 0, '#fail' => 0, '#exception' => 0, + '#debug' => 0, ); /** @@ -376,6 +377,12 @@ abstract class DrupalTestCase { * FALSE. */ protected function error($message = '', $group = 'Other', array $caller = NULL) { + if ($group == 'User notice') { + // Since 'User notice' is set by trigger_error() which is used for debug + // set the message to a status of 'debug'. + return $this->assert('debug', $message, 'Debug', $caller); + } + return $this->assert('exception', $message, $group, $caller); } -- cgit v1.2.3