- Timestamp:
- 07/13/2018 06:50:51 AM (7 years ago)
- Location:
- branches/4.9
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
tests/phpunit/tests/rest-api/rest-tags-controller.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.9
-
branches/4.9/tests/phpunit/tests/rest-api/rest-tags-controller.php
r43443 r43445 926 926 } 927 927 928 public function test_prepare_item_limit_fields() { 929 $request = new WP_REST_Request; 930 $endpoint = new WP_REST_Terms_Controller( 'post_tag' ); 931 $request->set_param( '_fields', 'id,name' ); 932 $term = get_term_by( 'id', $this->factory->tag->create(), 'post_tag' ); 933 $response = $endpoint->prepare_item_for_response( $term, $request ); 934 $this->assertEquals( array( 935 'id', 936 'name', 937 ), array_keys( $response->get_data() ) ); 938 } 939 928 940 public function test_get_item_schema() { 929 941 $request = new WP_REST_Request( 'OPTIONS', '/wp/v2/tags' );
Note: See TracChangeset
for help on using the changeset viewer.