mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 17:05:32 +02:00
correct required type for findEmail() $to (#255)
Follows same logic as thereIsAnEmailTitled() which sets the $to param of findEmail() to an empty string
This commit is contained in:
parent
86c6c8148f
commit
fdde72118b
@ -64,7 +64,7 @@ class EmailContext implements Context
|
|||||||
*/
|
*/
|
||||||
public function thereIsAnEmailFromTo($negate, $direction, $email)
|
public function thereIsAnEmailFromTo($negate, $direction, $email)
|
||||||
{
|
{
|
||||||
$to = ($direction == 'to') ? $email : null;
|
$to = ($direction == 'to') ? $email : '';
|
||||||
$from = ($direction == 'from') ? $email : null;
|
$from = ($direction == 'from') ? $email : null;
|
||||||
$match = $this->mailer->findEmail($to, $from);
|
$match = $this->mailer->findEmail($to, $from);
|
||||||
if (trim($negate ?? '')) {
|
if (trim($negate ?? '')) {
|
||||||
@ -84,7 +84,7 @@ class EmailContext implements Context
|
|||||||
*/
|
*/
|
||||||
public function thereIsAnEmailFromToTitled($negate, $direction, $email, $subject)
|
public function thereIsAnEmailFromToTitled($negate, $direction, $email, $subject)
|
||||||
{
|
{
|
||||||
$to = ($direction == 'to') ? $email : null;
|
$to = ($direction == 'to') ? $email : '';
|
||||||
$from = ($direction == 'from') ? $email : null;
|
$from = ($direction == 'from') ? $email : null;
|
||||||
$match = $this->mailer->findEmail($to, $from, $subject);
|
$match = $this->mailer->findEmail($to, $from, $subject);
|
||||||
$allMails = $this->mailer->findEmails($to, $from);
|
$allMails = $this->mailer->findEmails($to, $from);
|
||||||
|
Loading…
Reference in New Issue
Block a user