guncha25/codecept-drupal-drush

此包已被弃用,不再维护。作者建议使用guncha25/drupal-codeception包代替。

一个允许在测试期间运行drush命令的Codeception模块。

0.5.0 2017-10-05 15:41 UTC

This package is auto-updated.

Last update: 2019-09-30 08:44:48 UTC


README

一个用于运行Drupal Drush命令的Codeception模块。

Drupal Drush 是一个在 Codeception 模块,用于在 Drupal 网站上运行drush命令。

它还允许在测试中使用以下语句

// Execute "drush cc all"
$I->getDrush("cr")->mustRun();

使用Composer安装

{
    "require": {
        "codeception/codeception": "^2.2",
        "guncha25/codeception-drupal-drush": "~0.3"
    }
}

Drupal Drush 至少需要Codeception 2.0.*和PHP 5.4

示例套件配置

class_name: AcceptanceTester
modules:
    enabled:
        - PhpBrowser
        - AcceptanceHelper
        - DrupalDrush
    config:
        PhpBrowser:
            url: 'https:///myapp/'
        DrupalDrush:
            working_directory: '/path/to/webroot'

选项 working_directory 可以省略,默认为当前目录。