- 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-posts-controller.php
r52310 r52389 1695 1695 public function test_get_items_invalid_date() { 1696 1696 $request = new WP_REST_Request( 'GET', '/wp/v2/posts' ); 1697 $request->set_param( 'after', rand_str());1698 $request->set_param( 'before', rand_str());1697 $request->set_param( 'after', 'foo' ); 1698 $request->set_param( 'before', 'bar' ); 1699 1699 $response = rest_get_server()->dispatch( $request ); 1700 1700 $this->assertErrorResponse( 'rest_invalid_param', $response, 400 ); … … 1720 1720 public function test_get_items_invalid_modified_date() { 1721 1721 $request = new WP_REST_Request( 'GET', '/wp/v2/posts' ); 1722 $request->set_param( 'modified_after', rand_str());1723 $request->set_param( 'modified_before', rand_str());1722 $request->set_param( 'modified_after', 'foo' ); 1723 $request->set_param( 'modified_before', 'bar' ); 1724 1724 $response = rest_get_server()->dispatch( $request ); 1725 1725 $this->assertErrorResponse( 'rest_invalid_param', $response, 400 ); … … 2698 2698 array( 2699 2699 'post_mime_type' => 'image/jpeg', 2700 'menu_order' => rand( 1, 100 ),2700 'menu_order' => 1, 2701 2701 ) 2702 2702 ); … … 3311 3311 wp_set_current_user( self::$editor_id ); 3312 3312 3313 $new_content = rand_str();3313 $new_content = 'foo bar baz'; 3314 3314 $expected_modified = current_time( 'mysql' ); 3315 3315 … … 3376 3376 $params = $this->set_post_data( 3377 3377 array( 3378 'date' => rand_str(),3378 'date' => 'foo', 3379 3379 ) 3380 3380 ); … … 3391 3391 $params = $this->set_post_data( 3392 3392 array( 3393 'date_gmt' => rand_str(),3393 'date_gmt' => 'foo', 3394 3394 ) 3395 3395 );
Note: See TracChangeset
for help on using the changeset viewer.