mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@37358 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -6,11 +6,11 @@
|
||||
class Tests_Mail extends WP_UnitTestCase {
|
||||
function setUp() {
|
||||
parent::setUp();
|
||||
unset( $GLOBALS['phpmailer']->mock_sent );
|
||||
reset_phpmailer_instance();
|
||||
}
|
||||
|
||||
function tearDown() {
|
||||
unset( $GLOBALS['phpmailer']->mock_sent );
|
||||
reset_phpmailer_instance();
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user