Skip to content

tecbeast42/laravel-codeception-email-assertions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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('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');

About

Assertions to test Emails with laravel and Codeception

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages