correct required type for findEmail() $to

Follows same logic as thereIsAnEmailTitled() which sets the $to param of findEmail() to an empty string
This commit is contained in:
Scott Sutherland 2023-11-10 12:25:01 +13:00 committed by Scott Sutherland
parent 86c6c8148f
commit 055b56584e
1 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@ class EmailContext implements Context
*/
public function thereIsAnEmailFromTo($negate, $direction, $email)
{
$to = ($direction == 'to') ? $email : null;
$to = ($direction == 'to') ? $email : '';
$from = ($direction == 'from') ? $email : null;
$match = $this->mailer->findEmail($to, $from);
if (trim($negate ?? '')) {
@ -84,7 +84,7 @@ class EmailContext implements Context
*/
public function thereIsAnEmailFromToTitled($negate, $direction, $email, $subject)
{
$to = ($direction == 'to') ? $email : null;
$to = ($direction == 'to') ? $email : '';
$from = ($direction == 'from') ? $email : null;
$match = $this->mailer->findEmail($to, $from, $subject);
$allMails = $this->mailer->findEmails($to, $from);