PHP code example of tpayne / behat-mail-extension
1. Go to this page and download the library: Download tpayne/behat-mail-extension library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
tpayne / behat-mail-extension example snippets
/**
* @Then I should receive a welcome email
*/
public function iShouldReceiveAWelcomeEmail()
{
$message = $this->mail->getLatestMessage();
PHPUnit_Framework_Assert::assertEquals('Welcome!', $message->subject());
PHPUnit_Framework_Assert::assertContains('Please confirm your account', $message->plainText());
}