diff --git a/src/Context/EmailContext.php b/src/Context/EmailContext.php index bef22573..e16a13df 100644 --- a/src/Context/EmailContext.php +++ b/src/Context/EmailContext.php @@ -64,7 +64,7 @@ public function before(BeforeScenarioScope $event) */ 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 @@ public function thereIsAnEmailFromTo($negate, $direction, $email) */ 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);