Code Duplication    Length = 31-31 lines in 2 locations

tests/phpunit/tests/query/metaQuery.php 1 location

@@ 1772-1802 (lines=31) @@
1769
    /**
1770
     * @ticket 31045
1771
     */
1772
    public function test_orderby_clause_key_as_secondary_sort() 
1773
    {
1774
        $p1 = self::factory()->post->create(
1775
            array(
1776
            'post_date' => '2015-01-28 03:00:00',
1777
            ) 
1778
        );
1779
        $p2 = self::factory()->post->create(
1780
            array(
1781
            'post_date' => '2015-01-28 05:00:00',
1782
            ) 
1783
        );
1784
        $p3 = self::factory()->post->create(
1785
            array(
1786
            'post_date' => '2015-01-28 03:00:00',
1787
            ) 
1788
        );
1789
1790
        add_post_meta($p1, 'foo', 'jjj');
1791
        add_post_meta($p2, 'foo', 'zzz');
1792
        add_post_meta($p3, 'foo', 'aaa');
1793
1794
        $q = new WP_Query(
1795
            array(
1796
            'fields' => 'ids',
1797
            'meta_query' => array(
1798
            'foo_key' => array(
1799
            'key' => 'foo',
1800
            'compare' => 'EXISTS',
1801
            ),
1802
            ),
1803
            'orderby' => array(
1804
            'post_date' => 'asc',
1805
            'foo_key' => 'asc',

tests/phpunit/tests/user/query.php 1 location

@@ 276-306 (lines=31) @@
273
    /**
274
     * @ticket 31265
275
     */
276
    public function test_orderby_clause_key_as_secondary_sort() 
277
    {
278
        $u1 = self::factory()->user->create(
279
            array(
280
            'user_registered' => '2015-01-28 03:00:00',
281
            ) 
282
        );
283
        $u2 = self::factory()->user->create(
284
            array(
285
            'user_registered' => '2015-01-28 05:00:00',
286
            ) 
287
        );
288
        $u3 = self::factory()->user->create(
289
            array(
290
            'user_registered' => '2015-01-28 03:00:00',
291
            ) 
292
        );
293
294
        add_user_meta($u1, 'foo', 'jjj');
295
        add_user_meta($u2, 'foo', 'zzz');
296
        add_user_meta($u3, 'foo', 'aaa');
297
298
        $q = new WP_User_Query(
299
            array(
300
            'fields' => 'ids',
301
            'meta_query' => array(
302
            'foo_key' => array(
303
            'key' => 'foo',
304
            'compare' => 'EXISTS',
305
            ),
306
            ),
307
            'orderby' => array(
308
            'comment_date' => 'asc',
309
            'foo_key' => 'asc',