PHPUnit integeration for Drupal

1.2.1 2020-05-26 15:17 UTC

This package is auto-updated.

Last update: 2020-06-26 15:35:59 UTC


A group of classes used to help run tests using PHPUnit in Drupal.

upal assumes that tests are allowed to modify the database.



By default the configuration is read from UPAL_* environment variables. If that’s fine for you only need to ensure that upal’s classes are autoloadable.

Configuration can be loaded from array or file (YAML, XML, etc). upal uses this config library:

Example bootstrap.php

$config = new Upal\Config();
$config->set('drush', '/path/to/drush');
$config->set('drupal_root', '/path/to/drupal/root');
Upal\DrupalBootstrap::$config = $config;

Config Defaults

  • drush: UPAL_DRUSH, trim(which drush)
  • root: UPAL_ROOT, realpath('.')
  • web_url: UPAL_WEB_URL, 'http://upal'
  • tmp: UPAL_TMP, sys_get_temp_dir()