mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-03 14:17:06 +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:
@@ -249,7 +249,7 @@ class WP_Test_REST_Controller extends WP_Test_REST_TestCase {
|
||||
$args = rest_get_endpoint_args_for_schema( $controller->get_item_schema() );
|
||||
|
||||
$this->assertSame( 'A pretty string.', $args['somestring']['description'] );
|
||||
$this->assertFalse( isset( $args['someinteger']['description'] ) );
|
||||
$this->assertArrayNotHasKey( 'description', $args['someinteger'] );
|
||||
}
|
||||
|
||||
public function test_get_endpoint_args_for_item_schema_arg_options() {
|
||||
|
||||
Reference in New Issue
Block a user