- Timestamp:
- 08/15/2019 10:11:07 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-taxonomies-controller.php
r43571 r45813 194 194 array_keys( $response->get_data() ) 195 195 ); 196 } 197 198 public function test_object_types_is_an_array_if_object_type_is_unregistered() { 199 register_taxonomy_for_object_type( 'category', 'page' ); 200 register_taxonomy_for_object_type( 'category', 'attachment' ); 201 unregister_taxonomy_for_object_type( 'category', 'page' ); 202 203 $request = new WP_REST_Request( 'GET', '/wp/v2/taxonomies/category' ); 204 $response = rest_get_server()->dispatch( $request ); 205 206 $types = $response->get_data()['types']; 207 $this->assertArrayHasKey( 0, $types ); 208 $this->assertEquals( 'post', $types[0] ); 209 $this->assertArrayHasKey( 1, $types ); 210 $this->assertEquals( 'attachment', $types[1] ); 196 211 } 197 212
Note: See TracChangeset
for help on using the changeset viewer.