mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-10 15:44:29 +00:00
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:
@@ -616,8 +616,8 @@ class Tests_REST_Request extends WP_UnitTestCase {
|
||||
|
||||
$data = $valid->get_error_data( 'rest_missing_callback_param' );
|
||||
|
||||
$this->assertTrue( in_array( 'someinteger', $data['params'], true ) );
|
||||
$this->assertTrue( in_array( 'someotherinteger', $data['params'], true ) );
|
||||
$this->assertContains( 'someinteger', $data['params'] );
|
||||
$this->assertContains( 'someotherinteger', $data['params'] );
|
||||
}
|
||||
|
||||
public function test_has_valid_params_validate_callback() {
|
||||
|
||||
Reference in New Issue
Block a user