ixis / codeception-drupal-mail
此包已被废弃,不再维护。未建议替代包。
一个Codeception模块,用于提供Drupal邮件系统测试支持。
0.2.2
2016-02-11 16:53 UTC
Requires
This package is not auto-updated.
Last update: 2020-08-21 20:17:09 UTC
README
#Drupal邮件系统
用于测试Drupal邮件系统的Codeception模块。
// Test to see expected number of emails sent. $I->seeNumberOfEmailsSent(1); // Clear emails from queue. $I->clearSentEmails(); // Check email fields contains text $I->seeSentEmail(array( "body" => "body contains this text", "subject" => "subject contains this text", ));
依赖于TestingMailSystem类,该类将邮件存储在Drupal变量中。
#要求
- Drupal 7
- DrupalVariable codeception模块。
#安装
使用composer安装
"require": {
"ixis/codeception-drupal-mail": "dev-develop"
}
#配置
将'DrupalMailSystem'和'DrupalVariable'模块添加到套件配置中。
class_name: AcceptanceTester
modules:
enabled:
- DrupalMailSystem
- DrupalVariable
DrupalVariable是必需的,用于读取用于临时存储邮件内容的变量。
有关配置DrupalVariable的信息,请参阅ReadMe
##模块配置
- 'enabled' - 设置为true,在套件运行开始时将TestingMailSystem设置为默认邮件系统('mail_system'),并在运行结束时恢复。如果您将其设置为false,则模块期望您自己设置此选项。
drush vset --format=json 'mail_system' '{"default-system":"TestingMailSystem"}'