PHPUnit 集成到 Drupal

该软件包的官方仓库似乎已不存在,因此软件包已被冻结。

1.0.3 2015-08-12 14:39 UTC

This package is not auto-updated.

Last update: 2022-05-14 05:34:53 UTC


README

一组类,用于帮助在 Drupal 中使用 PHPUnit 运行测试。

upal 假设测试可以修改数据库。

使用方法

配置

配置可以从数组或文件(YAML、XML 等)中加载。使用此配置库:https://github.com/hassankhan/config.

示例

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

$bootstrap = new Upal\Bootstrap($config);
$bootstrap->setUp();

配置默认值

  • drush => trim(which drush)
  • root => realpath('.')
  • web_url => 'http://upal'
  • tmp => sys_get_temp_dir()
  • drupal_root => realpath('.')