Tests: Use more appropriate assertions in various tests.

This replaces instances of `assertSame( [number], count( ... ) )` with `assertCount()` to use native PHPUnit functionality.

Follow-up to [51335], [51337].

See #53363.

git-svn-id: https://develop.svn.wordpress.org/trunk@51367 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2021-07-07 10:32:56 +00:00
parent b1f0971ee3
commit e77691036d
63 changed files with 291 additions and 291 deletions
+2 -2
View File
@@ -100,7 +100,7 @@ class Tests_Meta extends WP_UnitTestCase {
$this->updated_mids = array();
foreach ( $found as $action => $mids ) {
$this->assertSame( 2, count( $mids ) );
$this->assertCount( 2, $mids );
}
}
@@ -137,7 +137,7 @@ class Tests_Meta extends WP_UnitTestCase {
)
);
$this->assertSame( 1, count( $u ) );
$this->assertCount( 1, $u );
// User found is not locally defined author (it's the admin).
$this->assertNotEquals( $this->author->user_login, $u[0]->user_login );