- Timestamp:
- 12/13/2016 03:51:01 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-attachments-controller.php
r39182 r39595 171 171 } 172 172 $this->assertEqualSets( $media_types, $data['endpoints'][0]['args']['media_type']['enum'] ); 173 } 174 175 public function test_registered_get_item_params() { 176 $id1 = $this->factory->attachment->create_object( $this->test_file, 0, array( 177 'post_mime_type' => 'image/jpeg', 178 'post_excerpt' => 'A sample caption', 179 ) ); 180 $request = new WP_REST_Request( 'OPTIONS', sprintf( '/wp/v2/media/%d', $id1 ) ); 181 $response = $this->server->dispatch( $request ); 182 $data = $response->get_data(); 183 $keys = array_keys( $data['endpoints'][0]['args'] ); 184 sort( $keys ); 185 $this->assertEquals( array( 'context' ), $keys ); 173 186 } 174 187
Note: See TracChangeset
for help on using the changeset viewer.