Changeset 55210 for trunk/tests/phpunit/tests/post/wpAfterInsertPost.php
- Timestamp:
- 02/03/2023 01:33:18 PM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/wpAfterInsertPost.php
r52010 r55210 172 172 173 173 $request = new WP_REST_Request( 'PUT', sprintf( '/wp/v2/posts/%d', $post_id ) ); 174 $request->add_header( ' content-type', 'application/x-www-form-urlencoded' );174 $request->add_header( 'Content-Type', 'application/x-www-form-urlencoded' ); 175 175 $request->set_body_params( array( 'title' => 'new title' ) ); 176 176 rest_get_server()->dispatch( $request ); … … 189 189 190 190 $request = new WP_REST_Request( 'POST', sprintf( '/wp/v2/posts' ) ); 191 $request->add_header( ' content-type', 'application/x-www-form-urlencoded' );191 $request->add_header( 'Content-Type', 'application/x-www-form-urlencoded' ); 192 192 $request->set_body_params( 193 193 array( … … 212 212 213 213 $request = new WP_REST_Request( 'PUT', sprintf( '/wp/v2/media/%d', $attachment_id ) ); 214 $request->add_header( ' content-type', 'application/x-www-form-urlencoded' );214 $request->add_header( 'Content-Type', 'application/x-www-form-urlencoded' ); 215 215 $request->set_body_params( array( 'title' => 'new attachment title' ) ); 216 216 rest_get_server()->dispatch( $request );
Note: See TracChangeset
for help on using the changeset viewer.