betterweekdays / upal
PHPUnit 集成到 Drupal
该软件包的官方仓库似乎已不存在,因此软件包已被冻结。
1.0.3
2015-08-12 14:39 UTC
Requires
- php: >=5.3.0
- hassankhan/config: 0.8.2
This package is not auto-updated.
Last update: 2022-05-14 05:34:53 UTC
README
一组类,用于帮助在 Drupal 中使用 PHPUnit 运行测试。
upal 假设测试可以修改数据库。
使用方法
- 安装 PHPUnit (https://phpunit.de/manual/current/en/installation.html) 和 Drush (http://drupal.org/project/drush).
- 检出或下载要测试的核心 Drupal(仅测试了 7.x)。
- 实现 Upal\Bootstrap 类
配置
配置可以从数组或文件(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('.')