- 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-statuses-controller.php
r43087 r43571 60 60 'trash', 61 61 'future', 62 ), array_keys( $data ) 62 ), 63 array_keys( $data ) 63 64 ); 64 65 } … … 139 140 $request->set_param( '_fields', 'id,name' ); 140 141 $response = $endpoint->prepare_item_for_response( $obj, $request ); 141 $this->assertEquals( array( 142 // 'id' doesn't exist in this context. 143 'name', 144 ), array_keys( $response->get_data() ) ); 142 $this->assertEquals( 143 array( 144 // 'id' doesn't exist in this context. 145 'name', 146 ), 147 array_keys( $response->get_data() ) 148 ); 145 149 } 146 150 … … 170 174 171 175 register_rest_field( 172 'status', 'my_custom_int', array( 176 'status', 177 'my_custom_int', 178 array( 173 179 'schema' => $schema, 174 180 'get_callback' => array( $this, 'additional_field_get_callback' ), … … 209 215 array( 210 216 'archives', 211 ), array_keys( $links ) 217 ), 218 array_keys( $links ) 212 219 ); 213 220 }
Note: See TracChangeset
for help on using the changeset viewer.