- Timestamp:
- 08/17/2018 01:50:26 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-post-types-controller.php
r43087 r43571 131 131 $request->set_param( '_fields', 'id,name' ); 132 132 $response = $endpoint->prepare_item_for_response( $obj, $request ); 133 $this->assertEquals( array( 134 // 'id' doesn't exist in this context. 135 'name', 136 ), array_keys( $response->get_data() ) ); 133 $this->assertEquals( 134 array( 135 // 'id' doesn't exist in this context. 136 'name', 137 ), 138 array_keys( $response->get_data() ) 139 ); 137 140 } 138 141 … … 165 168 166 169 register_rest_field( 167 'type', 'my_custom_int', array( 170 'type', 171 'my_custom_int', 172 array( 168 173 'schema' => $schema, 169 174 'get_callback' => array( $this, 'additional_field_get_callback' ),
Note: See TracChangeset
for help on using the changeset viewer.