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
This commit is contained in:
Boone Gorges
2016-01-13 04:42:59 +00:00
parent 0b564d48df
commit 5a545bbe90

View File

@@ -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 );
}
/**