Skip to content
Find file
New pull request
Pull request Compare This branch is 52 commits ahead, 6 commits behind weitzman:master.
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Drupal's test suite based on PHPUnit (

This fork by New Leaf Digital is a backport to Drupal 6, with a new approach (using an actual test site), and bug fixes.

Blog post about this project is here:

- Install PHPUnit (see below)
- Checkout or download a core Drupal that is to be tested.
  -- Map http://upal at to this Drupal in your web server config. If not possible,
     configure UPAL_WEB_URL in phpunit.xml (see Notes).
  -- Create an 'upal' database in mysql.
  -- If your db_url is not mysql://root:@, configure UPAL_DB_URL in
     phpunit.xml (see Notes).
- From the drupal root directory that is to be tested, run lines like:
    `phpunit --configuration /path/to/upal/phpnuit.xml FilterUnitTestCase modules/filter/filter.test`
    `phpunit --debug --configuration /path/to/upal/phpunit.xml ./modules/blog/blog.test`

- If customization is needed as per above, Copy phpunit.xml.dist to phpunit.xml and edit.

Install PHPUnit

Upal requires PHPUnit 3.5 or later; installing with PEAR is easiest.

- On Linux/OSX:
  sudo apt-get install php5-curl php-pear
  sudo pear upgrade --force PEAR
  sudo pear channel-discover
  sudo pear channel-discover
  sudo pear channel-discover
  sudo pear install --alldeps phpunit/PHPUnit

- On Windows:
Download and save from go-pear.phar

  php -q go-pear.phar
  pear channel-discover
  pear channel-discover
  pear channel-discover
  pear install --alldeps phpunit/PHPUnit
Something went wrong with that request. Please try again.