Changeset 46648
- Timestamp:
- 11/04/2019 12:34:35 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-posts-controller.php
r46646 r46648 979 979 $request->set_param( 'tags', array( $tag['term_id'] ) ); 980 980 $request->set_param( 'categories', array( $category['term_id'] ) ); 981 $request->set_param( 'orderby', 'id' ); 981 982 982 983 $response = rest_get_server()->dispatch( $request ); … … 1033 1034 $request->set_param( 'categories_exclude', array( $category['term_id'] ) ); 1034 1035 $request->set_param( 'tax_relation', 'OR' ); 1036 $request->set_param( 'orderby', 'id' ); 1035 1037 1036 1038 $response = rest_get_server()->dispatch( $request ); 1037 1039 $data = $response->get_data(); 1038 1040 $this->assertCount( 3, $data ); 1039 $this->assertEquals( $id 2, $data[0]['id'] );1040 $this->assertEquals( $id 4, $data[1]['id'] );1041 $this->assertEquals( $id4, $data[0]['id'] ); 1042 $this->assertEquals( $id2, $data[1]['id'] ); 1041 1043 $this->assertEquals( $id1, $data[2]['id'] ); 1042 1044 }
Note: See TracChangeset
for help on using the changeset viewer.