mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-01 11:14:36 +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:
@@ -265,7 +265,7 @@ class Tests_REST_API extends WP_UnitTestCase {
|
||||
*/
|
||||
function test_rest_route_query_var() {
|
||||
rest_api_init();
|
||||
$this->assertTrue( in_array( 'rest_route', $GLOBALS['wp']->public_query_vars, true ) );
|
||||
$this->assertContains( 'rest_route', $GLOBALS['wp']->public_query_vars );
|
||||
}
|
||||
|
||||
public function test_route_method() {
|
||||
|
||||
Reference in New Issue
Block a user