The doc page on SImpleTest reference http://drupal.org/node/26576 is missing the debug() function, which is quite useful.

In Drupal 6, this comes from a patch to core that comes with the SimpleTest module, so that should be mentioned. Anyway, if you call debug($variable) within a test, you get a print_r() style listing of the variable.

This page may also be missing other functions, so it should be checked over.

Comments

mgifford’s picture

That sure sounds useful. I've been banging my head on trying to debug simpletest. would be nice to have some help.

jhodgdon’s picture

If you're running D6, get the latest version of Simpletest and go to the Settings page. There's a debug option you can turn on.

EDIT: that option is automatically turned on in D7 when you run tests interactively. I think you've seen the output...

arianek’s picture

Issue tags: +Simpletest, +testing

tags

cleverington’s picture

Issue summary: View changes
Status: Active » Closed (fixed)

Postponed: All related docs updated

The SimpleTest Documentation has been rebuilt from the ground-up a couple of times since post creation.

The debug() functionality is specifically addressed at: https://www.drupal.org/node/394976