Download the PHP package ericmartel/codeception-email-mailcatcher without Composer
On this page you can find all versions of the php package ericmartel/codeception-email-mailcatcher. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ericmartel/codeception-email-mailcatcher
More information about ericmartel/codeception-email-mailcatcher
Files in ericmartel/codeception-email-mailcatcher
Package codeception-email-mailcatcher
Short Description Provides test helpers for Codeception when testing email functionality with MailCatcher
License MIT
Informations about the package codeception-email-mailcatcher
MailCatcher Service Provider for the Codeception Email Testing Framework
This Codeception Module implements the required methods to test emails using the Codeception Email Testing Framework with MailCatcher
Installation
Through composer, require the package:
Then turn it on in your Codeception suite yaml file
Additional parameters can be fed directly to the Guzzle connection using the guzzleRequestOptions
variable.
The variable deleteEmailsAfterScenario
can be set to true to ensure that all emails are deleted at the end of each scenario, but it is turned off by default.
Added Methods
This Module adds a few public methods for the user, such as:
Deletes all emails in MailCatcher
Fetches all email headers from MailCatcher, sorts them by timestamp and assigns them to the current and unread inboxes
Filters emails to only keep those that are received by the provided address
Pops the most recent unread email and assigns it as the email to conduct tests on
Example Test
Here is a simple scenario where we test the content of an email. For a detailed list of all available test methods, please refer to the Codeception Email Testing Framework.
License
Copyright (c) 2015-2016 Eric Martel, http://github.com/ericmartel [email protected]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.