From 2c3c286b8476884186493fd10ba4c921c5e26925 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Wed, 21 Oct 2015 22:33:53 +0000 Subject: [PATCH] Correctly use `WP_TESTS_EMAIL` in email tests. See #761, #34000 git-svn-id: https://develop.svn.wordpress.org/trunk@35347 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/comment.php | 2 +- tests/phpunit/tests/mail.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/tests/comment.php b/tests/phpunit/tests/comment.php index d3b0bf5c5e..983c31a34b 100644 --- a/tests/phpunit/tests/comment.php +++ b/tests/phpunit/tests/comment.php @@ -514,7 +514,7 @@ class Tests_Comment extends WP_UnitTestCase { // Check to see if a notification email was sent to the moderator `admin@example.org`. if ( isset( $GLOBALS['phpmailer']->mock_sent ) && ! empty( $GLOBALS['phpmailer']->mock_sent ) - && 'admin@example.org' == $GLOBALS['phpmailer']->mock_sent[0]['to'][0][0] + && WP_TESTS_EMAIL == $GLOBALS['phpmailer']->mock_sent[0]['to'][0][0] ) { $email_sent_when_comment_added = true; unset( $GLOBALS['phpmailer']->mock_sent ); diff --git a/tests/phpunit/tests/mail.php b/tests/phpunit/tests/mail.php index 81385dfbf3..667f9a29f8 100644 --- a/tests/phpunit/tests/mail.php +++ b/tests/phpunit/tests/mail.php @@ -20,7 +20,7 @@ class Tests_Mail extends WP_UnitTestCase { */ function test_wp_mail_break_it() { $content = str_repeat( 'A', 1000 ); - wp_mail( "admin@example.org", 'Looong line testing', $content); + wp_mail( WP_TESTS_EMAIL, 'Looong line testing', $content); } function test_wp_mail_custom_boundaries() {