Code Duplication    Length = 7-11 lines in 3 locations

tests/phpunit/tests/user/query.php 3 locations

@@ 442-448 (lines=7) @@
439
    /**
440
     * @ticket 31265
441
     */
442
    public function test_orderby_array_contains_invalid_item() 
443
    {
444
        $q = new WP_User_Query(
445
            array(
446
            'orderby' => array( 'login', 'foo', 'nicename' ),
447
            ) 
448
        );
449
450
        $this->assertContains("ORDER BY user_login ASC, user_nicename ASC", $q->query_orderby);
451
    }
@@ 470-480 (lines=11) @@
467
    /**
468
     * @ticket 31265
469
     */
470
    public function test_orderby_array() 
471
    {
472
        $q = new WP_User_Query(
473
            array(
474
            'orderby' => array(
475
            'login' => 'DESC',
476
            'nicename' => 'ASC',
477
            'email' => 'DESC',
478
            ),
479
            ) 
480
        );
481
482
        $this->assertContains("ORDER BY user_login DESC, user_nicename ASC, user_email DESC", $q->query_orderby);
483
    }
@@ 488-498 (lines=11) @@
485
    /**
486
     * @ticket 31265
487
     */
488
    public function test_orderby_array_should_discard_invalid_columns() 
489
    {
490
        $q = new WP_User_Query(
491
            array(
492
            'orderby' => array(
493
            'login' => 'DESC',
494
            'foo' => 'ASC',
495
            'email' => 'ASC',
496
            ),
497
            ) 
498
        );
499
500
        $this->assertContains("ORDER BY user_login DESC, user_email ASC", $q->query_orderby);
501
    }