Download the PHP package johnatannvmd/codeception-mailchecker-module without Composer

On this page you can find all versions of the php package johnatannvmd/codeception-mailchecker-module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package codeception-mailchecker-module

Codeception MailChecker Module

This repo is abandoned. Please use https://github.com/captbaritone/codeception-mailcatcher-module instead or any other similar project.

Build Status Coverage Status

This module will let you test emails that are sent during your Codeception acceptance tests.

It was inspired by the https://github.com/captbaritone/codeception-mailcatcher-module and https://github.com/fetch/zend-mail-codeception-module/.

It supports several mail testing tools:

Installation

Add the packages into your composer.json. For example we add Guzzle lib for MailCatcher for MailDump provider:

{
    "require-dev": {
        "codeception/codeception": "*",
        "johnatannvmd/mailchecker-codeception-module": "1.*"
    }
} 

Tell Composer to download the package:

php composer.phar update

Then enable it in your acceptance.suite.yml configuration and set the url and port of your site's MailCatcher installation:

class_name: WebGuy
modules:
    enabled:
        - MailChecker
    config:
        MailChecker:
            provider: MailCatcher
            options:
                url: 'http://project.dev'
                port: '1080'

Optional Configuration

If you need to specify some special options (e.g. SSL verification or authentication headers), you can set all of the allowed Guzzle request options:

class_name: WebGuy
modules:
    enabled:
        - MailChecker
    config:
        MailChecker:
            provider: MailDump
            options:
                url: 'http://project.dev'
                port: '1080'
                guzzleOptions:
                    auth: ['yo', 'yo']

Example Usage

seeInLastEmail

Checks that an email contains a value. It searches the full raw text of the email: headers, subject line, and body.

Example:

seeInLastEmailTo

Checks that the last email sent to an address contains a value. It searches the full raw text of the email: headers, subject line, and body.

This is useful if, for example a page triggers both an email to the new user, and to the administrator.

Example:

dontSeeInLastEmail

Checks that an email does NOT contain a value. It searches the full raw text of the email: headers, subject line, and body.

Example:

dontSeeInLastEmailTo

Checks that the last email sent to an address does NOT contain a value. It searches the full raw text of the email: headers, subject line, and body.

Example:

seeAttachmentFilenameInLastEmail

Checks that the last email have attachment with following filename.

Example:

dontSeeAttachmentFilenameInLastEmail)

Checks that the last email does NOT have attachment with following filename.

Example:

seeAttachmentFilenameInLastEmailTo

Checks that the last sent to an address have attachment with following filename.

Example:

dontSeeAttachmentFilenameInLastEmailTo

Checks that the last sent to an address does NOT have attachment with following filename.

Example:

seeAttachmentsCountInLastEmail

Asserts that a certain number of attachments found in the last email.

Example:

seeAttachmentsCountInLastEmailTo

Asserts that a certain number of attachments found in the last email to a given address.

Example:

seeCcInLastEmail

Look for the expected CC address in the last sent email.

Example:

seeCcInLastEmailTo

Look for the expected CC address in the last sent email to a given address.

Example:

grabMatchesFromLastEmail

Extracts an array of matches and sub-matches from the last email based on a regular expression. It searches the full raw text of the email: headers, subject line, and body. The return value is an array like that returned by preg_match().

Example:

grabFromLastEmail

Extracts a string from the last email based on a regular expression. It searches the full raw text of the email: headers, subject line, and body.

Example:

grabMatchesFromLastEmailTo

Extracts an array of matches and sub-matches from the last email to a given address based on a regular expression. It searches the full raw text of the email: headers, subject line, and body. The return value is an array like that returned by preg_match().

Example:

grabFromLastEmailTo

Extracts a string from the last email to a given address based on a regular expression. It searches the full raw text of the email: headers, subject line, and body.

Example:

seeEmailCount

Asserts that a certain number of emails have been sent since the last time clearMailbox() was called.

Example:

Docker

Now you can build all modules at once by:

License

Released under the same licence as Codeception: MIT


All versions of codeception-mailchecker-module with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
ext-mailparse Version *
ext-imap Version *
php-mime-mail-parser/php-mime-mail-parser Version ~2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package johnatannvmd/codeception-mailchecker-module contains the following files

Loading the files please wait ....