Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 336 Bytes

mock-mail.md

File metadata and controls

17 lines (11 loc) · 336 Bytes

Mock Mail


This mock the global phpmailer to intercept all call to wp_mail and return true/false to prevent the actual email being send during testing.

Mock wp_mail send successful

$this->mock->mail( [ 
    'send' => true,
] );

Mock wp_mail send failed

$this->mock->mail( [ 
    'send' => false,
] );