- Timestamp:
- 11/29/2022 03:49:49 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-post-statuses-controller.php
r54090 r54891 126 126 public function test_prepare_item() { 127 127 $obj = get_post_status_object( 'publish' ); 128 $endpoint = new WP_REST_Post_Statuses_Controller ;129 $request = new WP_REST_Request ;128 $endpoint = new WP_REST_Post_Statuses_Controller(); 129 $request = new WP_REST_Request(); 130 130 $request->set_param( 'context', 'edit' ); 131 131 $data = $endpoint->prepare_item_for_response( $obj, $request ); … … 135 135 public function test_prepare_item_limit_fields() { 136 136 $obj = get_post_status_object( 'publish' ); 137 $request = new WP_REST_Request ;138 $endpoint = new WP_REST_Post_Statuses_Controller ;137 $request = new WP_REST_Request(); 138 $endpoint = new WP_REST_Post_Statuses_Controller(); 139 139 $request->set_param( 'context', 'edit' ); 140 140 $request->set_param( '_fields', 'id,name' );
Note: See TracChangeset
for help on using the changeset viewer.