<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
johnatannvmd / codeception-mailchecker-module example snippets
$I = new WebGuy($scenario);
$I->wantTo('Get a password reset email');
// Cleared old emails from MailCatcher
$I->clearMailbox();
// Reset
$I->amOnPage('forgotPassword.php');
$I->fillField("input[name='email']", '[email protected]');
$I->click("Submit");
$I->see("Please check your email");
$I->seeInLastEmail("Please click this link to reset your password");
## Actions
### clearMailbox
Clears the emails in providers's list. This is prevents seeing emails sent
during a previous test. You probably want to do this before you trigger any
emails to be sent
Example:
// Clears all emails
$I->clearMailbox();
$I->seeInLastEmail('Thanks for signing up!');
$I->seeInLastEmailTo('[email protected]', 'Thanks for signing up!');
$I->seeInLastEmailTo('[email protected]', 'A new user has signed up!');
$I->dontSeeInLastEmail('Hit me with those laser beams');
$I->dontSeeInLastEmailTo('[email protected]', 'But shoot it in the right direction');