LaravelPackages.net
Acme Inc.
Toggle sidebar
tecbeast/laravel-codeception-email-assertions

This Module for codeception should enable easy assertions for emails with laravel 5.1+

10.706
2
2.0.0
About tecbeast/laravel-codeception-email-assertions

tecbeast/laravel-codeception-email-assertions is a Laravel package for this module for codeception should enable easy assertions for emails with laravel 5.1+. It currently has 2 GitHub stars and 10.706 downloads on Packagist (latest version 2.0.0). Install it with composer require tecbeast/laravel-codeception-email-assertions. Discover more Laravel packages by tecbeast or browse all Laravel packages to compare alternatives.

Last updated

Installation

    composer require tecbeast/laravel-codeception-email-assertions

Adapt codeceptions *.suite.yml file.

E.g.

class_name: UnitTester
modules:
    enabled:
        - Laravel5 # this is needed before EmailAssertions
        - EmailAssertions # this contains the email assertions

Assertions

All assertions will always look for the last email sent in the current test. The assertions should explain them self :).

    $I->seeEmailWasSent();
    $I->seeNoEmailWasSent();
    $I->seeEmailWasSentTo('[email protected]');
    $I->seeEmailWasNotSentTo('[email protected]');
    $I->seeEmailWasSentFrom('[email protected]');
    $I->seeEmailWasNotSentFrom('[email protected]');
    $I->seeEmailWasNotSentFrom('[email protected]');
    $I->seeEmailContains('Hello');
    $I->seeEmailContainsNot('Laravel');

Star History Chart