Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 DrupalTestCase.class.php
Octocat-spinner-32 README.txt
Octocat-spinner-32 phpunit.xml.dist
Octocat-spinner-32 upal.php
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.