- Timestamp:
- 12/19/2021 01:42:37 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-pages-controller.php
r52068 r52389 331 331 public function test_get_items_invalid_date() { 332 332 $request = new WP_REST_Request( 'GET', '/wp/v2/pages' ); 333 $request->set_param( 'after', rand_str());334 $request->set_param( 'before', rand_str());333 $request->set_param( 'after', 'foo' ); 334 $request->set_param( 'before', 'bar' ); 335 335 $response = rest_get_server()->dispatch( $request ); 336 336 $this->assertErrorResponse( 'rest_invalid_param', $response, 400 ); … … 370 370 public function test_get_items_invalid_modified_date() { 371 371 $request = new WP_REST_Request( 'GET', '/wp/v2/pages' ); 372 $request->set_param( 'modified_after', rand_str());373 $request->set_param( 'modified_before', rand_str());372 $request->set_param( 'modified_after', 'foo' ); 373 $request->set_param( 'modified_before', 'bar' ); 374 374 $response = rest_get_server()->dispatch( $request ); 375 375 $this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
Note: See TracChangeset
for help on using the changeset viewer.