I want to add debugging or verbose messages that are executed when my tests call drupalGet or drupalPost(). This currently seems impossible because when debug() is called from the executing code, it gets shown as a message 'in' the browser and never makes it to SimpleTest collector.

CommentFileSizeAuthor
#3 603410-error-handler.patch2.57 KBboombatower

Comments

dave reid’s picture

I can't even use simpletest_verbose() either. :/ Using DWTC->verbose() is out of the question because again, we're wanting to add this debugging info from normal code when tests are run, not inside the actual tests where ->verbose() is available.

Help me boombatower! You're my only hope!

boombatower’s picture

Assigned: Unassigned » boombatower
Category: support » bug

Hmm...not sure if I forgot to include the following lines in patch or what, because I know I had this working.

Eithere way just adding:

  set_error_handler('_drupal_error_handler');
  set_exception_handler('_drupal_exception_handler');

to common.inc _drupal_bootstrap_full() makes it happen.

I'll re-roll patch and make a patch of the patch :)

boombatower’s picture

Title: Adding debug messages for testing *not* insides tests » Missing backported error handler in _drupal_bootstrap_full()
Status: Active » Needs review
StatusFileSize
new2.57 KB
boombatower’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.