- Timestamp:
- 01/29/2020 12:43:23 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-taxonomies-controller.php
r46586 r47122 34 34 35 35 public function test_context_param() { 36 // Collection 36 // Collection. 37 37 $request = new WP_REST_Request( 'OPTIONS', '/wp/v2/taxonomies' ); 38 38 $response = rest_get_server()->dispatch( $request ); … … 40 40 $this->assertEquals( 'view', $data['endpoints'][0]['args']['context']['default'] ); 41 41 $this->assertEqualSets( array( 'view', 'edit', 'embed' ), $data['endpoints'][0]['args']['context']['enum'] ); 42 // Single 42 // Single. 43 43 $request = new WP_REST_Request( 'OPTIONS', '/wp/v2/taxonomies/post_tag' ); 44 44 $response = rest_get_server()->dispatch( $request ); … … 247 247 */ 248 248 private function get_public_taxonomies( $taxonomies ) { 249 // Pass through array_values to re-index after filtering 249 // Pass through array_values to re-index after filtering. 250 250 return array_values( array_filter( $taxonomies, array( $this, 'is_public' ) ) ); 251 251 }
Note: See TracChangeset
for help on using the changeset viewer.