Search by

particleflux / codeception-email

particleflux

Email Module for codeception

Package info

codeberg.org/particleflux/codeception-email

Issues

pkg:composer/particleflux/codeception-email

Statistics

Installs: 489

Dependents: 0

Suggesters: 0

0.0.1 2026-07-24 19:07 UTC

This package is auto-updated.

Last update: 2026-11-08 21:13:57 UTC


README

Packagist Version (custom server) Packagist PHP Version Build

A helper to test emails sent during Codeception tests.

No mailcatcher or mailtrap needed, relies on the existing module's grabLastSentEmail(). Or, theoretically, you can just pass in raw mails from wherever.

Installation

composer require --dev particleflux/codeception-email

Usage

Enable the module in your codeception suite, e.g.:

modules:
    enabled:
        - Asserts
        - particleflux\Codeception\Module\Email
        - Yii2   

Example usage:

$I->seeEmailIsSent(); // from yii2 module

// grabLastSentEmail() is yii2 module
$I->openMail((string) $I->grabLastSentEmail());

$I->seeInTo('tester2@hackthe.codes');
$I->seeSubjectContains('Verify your email');

$I->seeTextBodyContains("/site/verify-email?token=12345");