Changeset 36594 for trunk/tests/phpunit/tests/user.php
- Timestamp:
- 02/20/2016 03:40:49 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/user.php
r36482 r36594 1029 1029 wp_new_user_notification( self::$contrib_id, null, $notify ); 1030 1030 1031 $mailer = tests_retrieve_phpmailer_instance(); 1032 1031 1033 /* 1032 1034 * Check to see if a notification email was sent to the 1033 1035 * post author `blackburn@battlefield3.com` and and site admin `admin@example.org`. 1034 1036 */ 1035 if ( ! empty( $GLOBALS['phpmailer']->mock_sent ) ) { 1036 $was_admin_email_sent = ( isset( $GLOBALS['phpmailer']->mock_sent[0] ) && WP_TESTS_EMAIL == $GLOBALS['phpmailer']->mock_sent[0]['to'][0][0] ); 1037 $was_user_email_sent = ( isset( $GLOBALS['phpmailer']->mock_sent[1] ) && 'blackburn@battlefield3.com' == $GLOBALS['phpmailer']->mock_sent[1]['to'][0][0] ); 1038 } 1037 $admin_email = $mailer->get_recipient( 'to' ); 1038 $was_admin_email_sent = $admin_email && WP_TESTS_EMAIL === $admin_email->address; 1039 1040 $user_email = $mailer->get_recipient( 'to', 1 ); 1041 $was_user_email_sent = $user_email && 'blackburn@battlefield3.com' == $user_email->address; 1042 1039 1043 1040 1044 $this->assertSame( $admin_email_sent_expected, $was_admin_email_sent, 'Admin email result was not as expected in test_wp_new_user_notification' );
Note: See TracChangeset
for help on using the changeset viewer.