From 5a545bbe90812cbab788d478cafc2e206a2351c7 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Wed, 13 Jan 2016 04:42:59 +0000 Subject: [PATCH] Use `assertEqualSets()` in `comment_author` test. The previous assertion was too specific, resulting in race conditions. See #35377. git-svn-id: https://develop.svn.wordpress.org/trunk@36279 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/comment/query.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/tests/comment/query.php b/tests/phpunit/tests/comment/query.php index 82c23bee41..88fe55eb8c 100644 --- a/tests/phpunit/tests/comment/query.php +++ b/tests/phpunit/tests/comment/query.php @@ -814,11 +814,10 @@ class Tests_Comment_Query extends WP_UnitTestCase { $comments = get_comments( array( 'author_url' => 'http://foo.bar', + 'fields' => 'ids', ) ); - $this->assertCount( 2, $comments ); - $this->assertSame( $c1, (int) $comments[0]->comment_ID ); - $this->assertSame( $c2, (int) $comments[1]->comment_ID ); + $this->assertEqualSets( array( $c1, $c2 ), $comments ); } /**