Tests: Fully reset MockPHPMailer between tests.
Props pessoft. Fixes #41485. git-svn-id: https://develop.svn.wordpress.org/trunk@41185 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
bf39951441
commit
37ce2ffe85
@ -94,8 +94,8 @@ function tests_retrieve_phpmailer_instance() {
|
||||
*/
|
||||
function reset_phpmailer_instance() {
|
||||
$mailer = tests_retrieve_phpmailer_instance();
|
||||
if ( $mailer && isset( $mailer->mock_sent ) ) {
|
||||
unset( $mailer->mock_sent );
|
||||
if ( $mailer ) {
|
||||
$GLOBALS['phpmailer'] = new MockPHPMailer( true );
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user