Tests: Use more appropriate assertions in various tests.

This replaces instances of `assertTrue( isset( ... ) )` with `assertArrayHasKey()` to use native PHPUnit functionality.

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

See #53363.

git-svn-id: https://develop.svn.wordpress.org/trunk@51397 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2021-07-10 11:15:44 +00:00
parent cf7cc2843b
commit d77f065f24
43 changed files with 126 additions and 121 deletions
+1 -1
View File
@@ -134,7 +134,7 @@ class Tests_Widgets extends WP_UnitTestCase {
register_sidebars( 1, array( 'id' => 'wp-unit-test' ) );
$this->assertTrue( isset( $wp_registered_sidebars['wp-unit-test'] ) );
$this->assertArrayHasKey( 'wp-unit-test', $wp_registered_sidebars );
}