mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +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:
@@ -1024,7 +1024,7 @@ class Tests_User extends WP_UnitTestCase {
|
||||
* @ticket 36009
|
||||
*/
|
||||
function test_wp_new_user_notification( $notify, $admin_email_sent_expected, $user_email_sent_expected ) {
|
||||
unset( $GLOBALS['phpmailer']->mock_sent );
|
||||
reset_phpmailer_instance();
|
||||
|
||||
$was_admin_email_sent = false;
|
||||
$was_user_email_sent = false;
|
||||
@@ -1100,7 +1100,7 @@ class Tests_User extends WP_UnitTestCase {
|
||||
* @expectedDeprecated wp_new_user_notification
|
||||
*/
|
||||
function test_wp_new_user_notification_old_signature_throws_deprecated_warning_but_sends() {
|
||||
unset( $GLOBALS['phpmailer']->mock_sent );
|
||||
reset_phpmailer_instance();
|
||||
|
||||
$was_admin_email_sent = false;
|
||||
$was_user_email_sent = false;
|
||||
@@ -1125,7 +1125,7 @@ class Tests_User extends WP_UnitTestCase {
|
||||
* @ticket 34377
|
||||
*/
|
||||
function test_wp_new_user_notification_old_signature_no_password() {
|
||||
unset( $GLOBALS['phpmailer']->mock_sent );
|
||||
reset_phpmailer_instance();
|
||||
|
||||
$was_admin_email_sent = false;
|
||||
$was_user_email_sent = false;
|
||||
|
||||
Reference in New Issue
Block a user