/** * @Then it should be sent to :recipient * @Then the email with reset token should be sent to :recipient */ public function anEmailShouldBeSentTo($recipient) { Assert::true($this->emailChecker->hasRecipient($recipient), sprintf('An email should have been sent to %s.', $recipient)); }
/** * @Then the email with reset token should be sent to :email */ public function theEmailWithResetTokenShouldBeSentTo($email) { Assert::true($this->emailChecker->hasRecipient($email), sprintf('Email should have been sent to %s.', $email)); }
/** * @Then :count email(s) should be sent to :email */ public function numberOfEmailsShouldBeSentTo($count, $email) { Assert::true($this->emailChecker->hasRecipient($email), sprintf('At least 1 email should have been sent to %s.', $email)); Assert::eq($this->emailChecker->getMessagesCount(), $count, sprintf('%d messages were sent, while there should be %d.', $this->emailChecker->getMessagesCount(), $count)); }
/** * @param string $recipient */ private function assertEmailHasRecipient($recipient) { Assert::true($this->emailChecker->hasRecipient($recipient), 'An email should have been sent to %s.'); }