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: 220

Dependents: 0

Suggesters: 0

0.0.1 2026-07-24 19:07 UTC

This package is not auto-updated.

Last update: 2026-09-05 16:05:31 UTC


README

A helper to test emails sent during Codeception tests.

No mailcatcher or mailtrap needed, relies on existing modules 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");