Download the PHP package drakakisgeo/mailtester without Composer
On this page you can find all versions of the php package drakakisgeo/mailtester. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download drakakisgeo/mailtester
More information about drakakisgeo/mailtester
Files in drakakisgeo/mailtester
Package mailtester
Short Description Mail testing helper
License MIT
Homepage https://github.com/drakakisgeo/mailtester
Informations about the package mailtester
Mail Tester
A package to help with acceptance Email testing. The goal is to add usefull PHPunit assertions in a Trait that you can include when there is a need to test emails that are fired from acceptance testing packages like Laravel Dusk.
Install
This package assumes that you've already installed Mailcatcher. You can check this tutorial on how to install it to your system.
Via Composer
Laravel 5.*
After updating composer, add the ServiceProvider to the providers array in config/app.php
Copy the package config to your local config with the publish command:
Instructions
Include the InteractsWithMailCatcher Trait in your test and make sure that your test extends the Laravel's Testcase class. Immediately you have access to the following methods:
Email was send
- assertEmailIsSent()
Email subject contains a $string
- assertEmailFirstSubjectContains()
- assertEmailLastSubjectContains()
- assertEmailNthSubjectContains()
Email subject equals a $string
- assertEmailFirstSubjectEquals()
- assertEmailLastSubjectEquals()
- assertEmailNthSubjectEquals()
- assertEmailSubjectEquals()
Email Html body contains a $string
- assertEmailFirstHtmlContains()
- assertEmailLastHtmlContains()
- assertEmailNthHtmlContains()
- assertEmailHtmlContains()
Email Text body contains a $string
- assertEmailFirstTextContains()
- assertEmailLastTextContains()
- assertEmailNthTextContains()
- assertEmailTextContains()
Email sender is the target $email
- assertEmailFirstSenderEquals()
- assertEmailLastSenderEquals()
- assertEmailNthSenderEquals()
- assertEmailSenderEquals()
Email recipient is the target $email
- assertEmailFirstRecipientsContain()
- assertEmailLastRecipientsContain()
- assertEmailNthRecipientsContain()
- assertEmailRecipientsContain()
Email Cc is the target $email
- assertEmailFirstCcContain()
- assertEmailLastCcContain()
- assertEmailNthCcContain()
- assertEmailCcContain()
Email Bcc is the target $email
- assertEmailFirstBccContain()
- assertEmailLastBccContain()
- assertEmailNthtBccContain()
- assertEmailBccContain()
Email Attachment is the target $file
- Soon!
Contributing
Please see CONDUCT for details.
Credits
- Drakakis George
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of mailtester with dependencies
illuminate/contracts Version ^5.0|6.*|^7.0|^8.0
illuminate/support Version ^5.0|6.*|^7.0|^8.0
guzzlehttp/guzzle Version ~6.0|~7.1