tecbeast / laravel-codeception-email-assertions
本模块适用于codeception,可简化使用laravel 5.1+发送邮件的断言
2.0.0
2020-06-19 12:05 UTC
Requires
- php: >=7.0.0
- codeception/codeception: >=2.0.0
- laravel/framework: >=5.1.0
README
composer require tecbeast/laravel-codeception-email-assertions
适配codeceptions *.suite.yml文件。
例如:
class_name: UnitTester
modules:
enabled:
- Laravel5 # this is needed before EmailAssertions
- EmailAssertions # this contains the email assertions
断言
所有断言将始终查找当前测试中发送的最后一封电子邮件。断言应自解释:)。
$I->seeEmailWasSent();
$I->seeNoEmailWasSent();
$I->seeEmailWasSentTo('to@domain.com');
$I->seeEmailWasNotSentTo('from@domain.com');
$I->seeEmailWasSentFrom('from@domain.com');
$I->seeEmailWasNotSentFrom('to@domain.com');
$I->seeEmailWasNotSentFrom('to@domain.com');
$I->seeEmailContains('Hello');
$I->seeEmailContainsNot('Laravel');