Make WordPress Core

Changeset 40278


Ignore:
Timestamp:
03/11/2017 03:07:27 AM (9 years ago)
Author:
boonebgorges
Message:

Tests: Use assertSame() for WP_Query 'orderby' tests.

assertEqualSets() ignores order, so isn't much good for testing 'orderby'.

See #38034.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/post/query.php

    r37721 r40278  
    137137                        'orderby' => 'post__in'
    138138                ) );
    139                 $this->assertEqualSets( $ordered, wp_list_pluck( $q->posts, 'ID' ) );
     139                $this->assertSame( $ordered, wp_list_pluck( $q->posts, 'ID' ) );
    140140        }
    141141
     
    176176                        'orderby' => 'post__in'
    177177                ) );
    178                 $this->assertEqualSets( $ordered, wp_list_pluck( $attached->posts, 'ID' ) );
     178                $this->assertSame( $ordered, wp_list_pluck( $attached->posts, 'ID' ) );
    179179        }
    180180
Note: See TracChangeset for help on using the changeset viewer.