Changeset 48642 for trunk/tests/phpunit/tests/rest-api/rest-request.php
- Timestamp:
- 07/27/2020 06:44:14 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-request.php
r47559 r48642 766 766 $this->assertEquals( array( 'param' => 'new_value' ), $request->get_query_params() ); 767 767 } 768 769 /** 770 * @ticket 50786 771 */ 772 public function test_set_param_with_invalid_json() { 773 $request = new WP_REST_Request(); 774 $request->add_header( 'content-type', 'application/json' ); 775 $request->set_method( 'POST' ); 776 $request->set_body( '' ); 777 $request->set_param( 'param', 'value' ); 778 779 $this->assertTrue( $request->has_param( 'param' ) ); 780 $this->assertEquals( 'value', $request->get_param( 'param' ) ); 781 } 768 782 }
Note: See TracChangeset
for help on using the changeset viewer.