Tests: Use `assertSame()` for `WP_Query` 'orderby' tests.
`assertEqualSets()` ignores order, so isn't much good for testing 'orderby'. See #38034. git-svn-id: https://develop.svn.wordpress.org/trunk@40278 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
824c50f8ae
commit
5e74056898
|
@ -136,7 +136,7 @@ class Tests_Post_Query extends WP_UnitTestCase {
|
||||||
'post__in' => $ordered,
|
'post__in' => $ordered,
|
||||||
'orderby' => 'post__in'
|
'orderby' => 'post__in'
|
||||||
) );
|
) );
|
||||||
$this->assertEqualSets( $ordered, wp_list_pluck( $q->posts, 'ID' ) );
|
$this->assertSame( $ordered, wp_list_pluck( $q->posts, 'ID' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
function test_post__in_attachment_ordering() {
|
function test_post__in_attachment_ordering() {
|
||||||
|
@ -175,7 +175,7 @@ class Tests_Post_Query extends WP_UnitTestCase {
|
||||||
'posts_per_page' => '-1',
|
'posts_per_page' => '-1',
|
||||||
'orderby' => 'post__in'
|
'orderby' => 'post__in'
|
||||||
) );
|
) );
|
||||||
$this->assertEqualSets( $ordered, wp_list_pluck( $attached->posts, 'ID' ) );
|
$this->assertSame( $ordered, wp_list_pluck( $attached->posts, 'ID' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue