WordPress.org

Make WordPress Core

Changeset 41185


Ignore:
Timestamp:
07/29/2017 08:52:45 PM (2 years ago)
Author:
SergeyBiryukov
Message:

Tests: Fully reset MockPHPMailer between tests.

Props pessoft.
Fixes #41485.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/mock-mailer.php

    r38058 r41185  
    9595function reset_phpmailer_instance() {
    9696    $mailer = tests_retrieve_phpmailer_instance();
    97     if ( $mailer && isset( $mailer->mock_sent ) ) {
    98         unset( $mailer->mock_sent );
     97    if ( $mailer ) {
     98        $GLOBALS['phpmailer'] = new MockPHPMailer( true );
    9999        return true;
    100100    }
Note: See TracChangeset for help on using the changeset viewer.