mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-13 05:10:18 +00:00
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:
@@ -891,7 +891,7 @@ class Tests_Post extends WP_UnitTestCase {
|
||||
register_post_status( 'test' );
|
||||
|
||||
$counts = wp_count_posts();
|
||||
$this->assertTrue( isset( $counts->test ) );
|
||||
$this->assertObjectHasAttribute( 'test', $counts );
|
||||
$this->assertSame( 0, $counts->test );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user