mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-02 16:20:05 +00:00
Tests: Use more appropriate assertions in various tests.
This replaces instances of `assertTrue( ... > 0 )` with `assertGreaterThan()` to use native PHPUnit functionality. Follow-up to [51335], [51337], [51367], [51397], [51403], [51404], [51436], [51438], [51448], [51449], [51451], [51453]. See #53363. git-svn-id: https://develop.svn.wordpress.org/trunk@51454 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -513,7 +513,7 @@ class WP_Test_REST_Controller extends WP_Test_REST_TestCase {
|
||||
|
||||
$first_call_count = $listener->get_call_count( $method );
|
||||
|
||||
$this->assertTrue( $first_call_count > 0 );
|
||||
$this->assertGreaterThan( 0, $first_call_count );
|
||||
|
||||
$request->set_param( '_fields', 'somestring' );
|
||||
|
||||
@@ -525,7 +525,7 @@ class WP_Test_REST_Controller extends WP_Test_REST_TestCase {
|
||||
|
||||
$controller->prepare_item_for_response( $item, $request );
|
||||
|
||||
$this->assertTrue( $listener->get_call_count( $method ) > $first_call_count );
|
||||
$this->assertGreaterThan( $first_call_count, $listener->get_call_count( $method ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user