Tests: Use more appropriate assertions in various tests.

This replaces instances of `assertTrue( in_array( ... ) )` with `assertContains()` to use native PHPUnit functionality.

Follow-up to [51335], [51337], [51367], [51397], [51403].

Props hellofromTonya, jrf, SergeyBiryukov.
Fixes #53123. See #53363.

git-svn-id: https://develop.svn.wordpress.org/trunk@51404 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2021-07-12 10:35:44 +00:00
parent 5d9a38ef41
commit c96a42e08a
25 changed files with 78 additions and 78 deletions

View File

@@ -62,7 +62,7 @@ class Tests_Pluggable extends WP_UnitTestCase {
foreach ( $expected as $function => $sig ) {
$msg = 'Function: ' . $function . '()';
$this->assertTrue( function_exists( $function ), $msg );
$this->assertTrue( in_array( $function, $defined, true ), $msg );
$this->assertContains( $function, $defined, $msg );
}
}