O'Reilly logo

Drupal 7 First Look by Mark Noble

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Testing framework

Drupal 7 also introduces a new testing framework called SimpleTest that can be used to test the business logic of your modules. A full discussion of the testing process is beyond the scope of this book, but we will do a quick walkthrough of the framework and look at some of the hooks that your module may want to implement to interact with the SimpleTest framework. For a complete discussion of building tests using the SimpleTest framework, see: http://drupal.org/simpletest.

Setting up SimpleTest

To use SimpleTest, you need to do some configuration of your PHP installation.

  • The CURL extension for PHP must be enabled.
  • The DOM extension for PHP must be enabled. This should be done already in all installations of PHP 5.
  • A memory_limit ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required