WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/04/16 03:48:46 (19 months ago)
Author:
boonebgorges
Message:

Tests: Introduce reset_phpmailer_instance() function.

This function provides a more convenient method for resetting the
PHPMailer instance than the previous technique of reaching into the global.

Props welcher.
Fixes #36658.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/mail.php

    r37307 r37358  
    77    function setUp() { 
    88        parent::setUp(); 
    9         unset( $GLOBALS['phpmailer']->mock_sent ); 
     9        reset_phpmailer_instance(); 
    1010    } 
    1111 
    1212    function tearDown() { 
    13         unset( $GLOBALS['phpmailer']->mock_sent ); 
     13        reset_phpmailer_instance(); 
    1414        parent::tearDown(); 
    1515    } 
Note: See TracChangeset for help on using the changeset viewer.