Code Duplication    Length = 19-19 lines in 2 locations

tests/phpunit/tests/user.php 2 locations

@@ 1197-1215 (lines=19) @@
1194
     * @ticket             33654
1195
     * @expectedDeprecated wp_new_user_notification
1196
     */
1197
    function test_wp_new_user_notification_old_signature_throws_deprecated_warning_but_sends() 
1198
    {
1199
        reset_phpmailer_instance();
1200
1201
        $was_admin_email_sent = false;
1202
        $was_user_email_sent = false;
1203
        wp_new_user_notification(self::$contrib_id, 'this_is_a_test_password');
1204
1205
        /*
1206
         * Check to see if a notification email was sent to the
1207
         * post author `[email protected]` and and site admin `[email protected]`.
1208
         */
1209
        if (! empty($GLOBALS['phpmailer']->mock_sent) ) {
1210
            $was_admin_email_sent = ( isset($GLOBALS['phpmailer']->mock_sent[0]) && WP_TESTS_EMAIL == $GLOBALS['phpmailer']->mock_sent[0]['to'][0][0] );
1211
            $was_user_email_sent = ( isset($GLOBALS['phpmailer']->mock_sent[1]) && '[email protected]' == $GLOBALS['phpmailer']->mock_sent[1]['to'][0][0] );
1212
        }
1213
1214
        $this->assertTrue($was_admin_email_sent);
1215
        $this->assertTrue($was_user_email_sent);
1216
    }
1217
1218
    /**
@@ 1223-1241 (lines=19) @@
1220
     *
1221
     * @ticket 34377
1222
     */
1223
    function test_wp_new_user_notification_old_signature_no_password() 
1224
    {
1225
        reset_phpmailer_instance();
1226
1227
        $was_admin_email_sent = false;
1228
        $was_user_email_sent = false;
1229
        wp_new_user_notification(self::$contrib_id);
1230
1231
        /*
1232
         * Check to see if a notification email was sent to the
1233
         * post author `[email protected]` and and site admin `[email protected]`.
1234
         */
1235
        if (! empty($GLOBALS['phpmailer']->mock_sent) ) {
1236
            $was_admin_email_sent = ( isset($GLOBALS['phpmailer']->mock_sent[0]) && WP_TESTS_EMAIL == $GLOBALS['phpmailer']->mock_sent[0]['to'][0][0] );
1237
            $was_user_email_sent = ( isset($GLOBALS['phpmailer']->mock_sent[1]) && '[email protected]' == $GLOBALS['phpmailer']->mock_sent[1]['to'][0][0] );
1238
        }
1239
1240
        $this->assertTrue($was_admin_email_sent);
1241
        $this->assertFalse($was_user_email_sent);
1242
    }
1243
1244
    /**