Skip to content


Subversion checkout URL

You can clone with
Download ZIP
PHPUnit based test framework for Drupal. Aims to runs all the existing Simpletests without modification.
Latest commit 1fe0d32 @weitzman Update README.txt


*Update: Drupal 8 now uses PHPUnit for its unit tests. It still uses simpletest for its system tests. Upal's 
purpose as a showcase and proof of concept has been fulfilled and no further work is expected.*

Drupal's test suite based on PHPUnit (

- Install PHPUnit (see below) and Drush (
- Checkout or download a core Drupal that is to be tested (only tested with 8.x).
  -- Map http://upal to this Drupal in your web server config. If not possible,
     configure UPAL_WEB_URL in phpunit.xml (see Notes).
  -- Create an 'upal' database on your database server.
  -- 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/phpunit.xml FilterUnitTestCase core/modules/filter/filter.test`
    `phpunit --debug --configuration /path/to/upal/phpunit.xml core/modules/book/book.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.