intelektron / codeception-drupal-bootstrap
Codeception 模块,用于向测试套件暴露 Drupal API。
1.0.2
2022-04-16 15:02 UTC
Requires
- codeception/codeception: ^4.0|^3.0|^2.0
Requires (Dev)
- mikey179/vfsstream: ^1.4
- phpspec/prophecy: ^1.3
- satooshi/php-coveralls: ^2.0
Suggests
- chriscohen/codeception-drupal-content-types: A Codeception module to provide Drupal content types support.
- chriscohen/codeception-drupal-pages: A Codeception module to provide standard Drupal page objects.
- pfaocle/codeception-module-drupal-user-registry: A Codeception module for managing test users.
This package is auto-updated.
Last update: 2024-09-16 20:34:45 UTC
README
此模块旨在允许在测试期间使用 Drupal API 进行测试。这允许对您的 Drupal 站点进行更好的功能测试。
这是一个为 Codeception 2.x-4.x 和 Drupal 7.x-9.x 的分支。
它还使得使用 Drupal 进行测试驱动开发变得更容易,因为您可以对通过 UI 创建的项目进行断言。
安装
$ composer require intelektron/codeception-module-drupal --dev
使用方法
在您的 *.suite.yml
文件中,将 Drupal
添加到您的启用模块列表中。
示例配置
这将假设您的 Drupal 安装在 drupal
子目录下运行测试。
class_name: AcceptanceTester modules: enabled: \Codeception\Module\Drupal7\Drupal7: root: 'drupal' relative: yes
选项
root
接受: string
默认: 当前工作目录
这定义了 Drupal 根目录与 codecept.yml
文件的关系。如果未传递,则默认为当前工作目录。
relative
接受: yes
或 no
默认: no
这允许您指定 Drupal 根目录的路径是否相对于 codeception.yml
文件。接受 yes
或 no
。
许可证
本项目采用 MIT 许可证(MIT)授权。