From 5e74056898afcf23f05356bf7915446133ef1c1b Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Sat, 11 Mar 2017 03:07:27 +0000 Subject: [PATCH] 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 --- tests/phpunit/tests/post/query.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/tests/post/query.php b/tests/phpunit/tests/post/query.php index 0ede881c58..6ae8114607 100644 --- a/tests/phpunit/tests/post/query.php +++ b/tests/phpunit/tests/post/query.php @@ -136,7 +136,7 @@ class Tests_Post_Query extends WP_UnitTestCase { 'post__in' => $ordered, '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() { @@ -175,7 +175,7 @@ class Tests_Post_Query extends WP_UnitTestCase { 'posts_per_page' => '-1', 'orderby' => 'post__in' ) ); - $this->assertEqualSets( $ordered, wp_list_pluck( $attached->posts, 'ID' ) ); + $this->assertSame( $ordered, wp_list_pluck( $attached->posts, 'ID' ) ); } /**