Index: tests/phpunit/includes/mock-mailer.php
===================================================================
--- tests/phpunit/includes/mock-mailer.php	(revision 37338)
+++ tests/phpunit/includes/mock-mailer.php	(working copy)
@@ -84,3 +84,21 @@
 	}
 	return $mailer;
 }
+
+
+/**
+ * Helper method to reset the phpmailer instance.
+ *
+ * @since 4.6.0
+ *
+ * @return bool
+ */
+function reset_php_mailer_instance() {
+	$mailer = tests_retrieve_phpmailer_instance();
+	if ( $mailer && isset( $mailer->mock_sent ) ) {
+		unset( $mailer->mock_sent );
+		return true;
+	}
+
+	return false;
+}
Index: tests/phpunit/tests/comment.php
===================================================================
--- tests/phpunit/tests/comment.php	(revision 37338)
+++ tests/phpunit/tests/comment.php	(working copy)
@@ -9,7 +9,7 @@
 
 	public function setUp() {
 		parent::setUp();
-		unset( $GLOBALS['phpmailer']->mock_sent );
+		reset_php_mailer_instance();
 	}
 
 	public static function wpSetUpBeforeClass( $factory ) {
@@ -558,7 +558,7 @@
 			&& WP_TESTS_EMAIL == $GLOBALS['phpmailer']->mock_sent[0]['to'][0][0]
 		) {
 			$email_sent_when_comment_added = true;
-			unset( $GLOBALS['phpmailer']->mock_sent );
+			reset_php_mailer_instance();
 		} else {
 			$email_sent_when_comment_added = false;
 		}
@@ -589,7 +589,7 @@
 		} else {
 			$email_sent_when_comment_approved = false;
 		}
-		unset( $GLOBALS['phpmailer']->mock_sent );
+		reset_php_mailer_instance();
 
 		// Post authors are notified when a new comment is added to their post.
 		$data = array(
@@ -607,7 +607,7 @@
 		     ! empty( $GLOBALS['phpmailer']->mock_sent ) &&
 		     'test@test.com' == $GLOBALS['phpmailer']->mock_sent[0]['to'][0][0] ) {
 			$email_sent_when_comment_added = true;
-			unset( $GLOBALS['phpmailer']->mock_sent );
+			reset_php_mailer_instance();
 		} else {
 			$email_sent_when_comment_added = false;
 		}
Index: tests/phpunit/tests/mail.php
===================================================================
--- tests/phpunit/tests/mail.php	(revision 37338)
+++ tests/phpunit/tests/mail.php	(working copy)
@@ -6,12 +6,12 @@
 class Tests_Mail extends WP_UnitTestCase {
 	function setUp() {
 		parent::setUp();
-		unset( $GLOBALS['phpmailer']->mock_sent );
+		reset_php_mailer_instance();
 	}
 
 	function tearDown() {
-		unset( $GLOBALS['phpmailer']->mock_sent );
 		parent::tearDown();
+		reset_php_mailer_instance();
 	}
 
 	/**
Index: tests/phpunit/tests/user.php
===================================================================
--- tests/phpunit/tests/user.php	(revision 37338)
+++ tests/phpunit/tests/user.php	(working copy)
@@ -1024,7 +1024,7 @@
 	 * @ticket 36009
 	 */
 	function test_wp_new_user_notification( $notify, $admin_email_sent_expected, $user_email_sent_expected ) {
-		unset( $GLOBALS['phpmailer']->mock_sent );
+		reset_php_mailer_instance();
 
 		$was_admin_email_sent = false;
 		$was_user_email_sent = false;
@@ -1100,7 +1100,7 @@
 	 * @expectedDeprecated wp_new_user_notification
 	 */
 	function test_wp_new_user_notification_old_signature_throws_deprecated_warning_but_sends() {
-		unset( $GLOBALS['phpmailer']->mock_sent );
+		reset_php_mailer_instance();
 
 		$was_admin_email_sent = false;
 		$was_user_email_sent = false;
@@ -1125,7 +1125,7 @@
 	 * @ticket 34377
 	 */
 	function test_wp_new_user_notification_old_signature_no_password() {
-		unset( $GLOBALS['phpmailer']->mock_sent );
+		reset_php_mailer_instance();
 
 		$was_admin_email_sent = false;
 		$was_user_email_sent = false;
