- 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-comments-controller.php
r51568 r52389 889 889 public function test_get_comments_invalid_date() { 890 890 $request = new WP_REST_Request( 'GET', '/wp/v2/comments' ); 891 $request->set_param( 'after', rand_str());892 $request->set_param( 'before', rand_str());891 $request->set_param( 'after', 'foo' ); 892 $request->set_param( 'before', 'bar' ); 893 893 $response = rest_get_server()->dispatch( $request ); 894 894 $this->assertErrorResponse( 'rest_invalid_param', $response, 400 ); … … 1478 1478 'author_url' => 'http://timothylovejoy.jr', 1479 1479 'content' => 'It\'s all over\, people! We don\'t have a prayer!', 1480 'date' => rand_str(),1480 'date' => 'foo-bar', 1481 1481 ); 1482 1482 … … 2626 2626 2627 2627 $params = array( 2628 'content' => rand_str(),2629 'date' => rand_str(),2628 'content' => 'content', 2629 'date' => 'foo', 2630 2630 ); 2631 2631 … … 2642 2642 2643 2643 $params = array( 2644 'content' => rand_str(),2645 'date_gmt' => rand_str(),2644 'content' => 'content', 2645 'date_gmt' => 'foo', 2646 2646 ); 2647 2647 … … 2771 2771 $request = new WP_REST_Request( 'PUT', sprintf( '/wp/v2/comments/%s', $child_comment ) ); 2772 2772 $request->set_param( 'parent', $comment_id_1 ); 2773 $request->set_param( 'content', rand_str());2773 $request->set_param( 'content', 'foo bar' ); 2774 2774 $response = rest_get_server()->dispatch( $request ); 2775 2775 $this->assertSame( 200, $response->get_status() );
Note: See TracChangeset
for help on using the changeset viewer.