Make WordPress Core


Ignore:
Timestamp:
01/13/2016 04:42:59 AM (9 years ago)
Author:
boonebgorges
Message:

Use assertEqualSets() in comment_author test.

The previous assertion was too specific, resulting in race conditions.

See #35377.

File:
1 edited

Legend:

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

    r36277 r36279  
    815815        $comments = get_comments( array(
    816816            'author_url' => 'http://foo.bar',
    817         ) );
    818 
    819         $this->assertCount( 2, $comments );
    820         $this->assertSame( $c1, (int) $comments[0]->comment_ID );
    821         $this->assertSame( $c2, (int) $comments[1]->comment_ID );
     817            'fields' => 'ids',
     818        ) );
     819
     820        $this->assertEqualSets( array( $c1, $c2 ), $comments );
    822821    }
    823822
Note: See TracChangeset for help on using the changeset viewer.