Changeset 43680
- Timestamp:
- 10/08/2018 01:49:51 PM (6 years ago)
- Location:
- branches/5.0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0/src/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php
r43445 r43680 323 323 'readonly' => true, 324 324 ), 325 'visibility' => array( 326 'description' => __( 'The visibility settings for the taxonomy.' ), 327 'type' => 'object', 328 'context' => array( 'edit' ), 329 'readonly' => true, 330 ), 325 331 'rest_base' => array( 326 332 'description' => __( 'REST base route for the taxonomy.' ), -
branches/5.0/tests/phpunit/tests/rest-api/rest-taxonomies-controller.php
r43445 r43680 198 198 $data = $response->get_data(); 199 199 $properties = $data['schema']['properties']; 200 $this->assertEquals( 9, count( $properties ) );200 $this->assertEquals( 10, count( $properties ) ); 201 201 $this->assertArrayHasKey( 'capabilities', $properties ); 202 202 $this->assertArrayHasKey( 'description', $properties ); … … 207 207 $this->assertArrayHasKey( 'show_cloud', $properties ); 208 208 $this->assertArrayHasKey( 'types', $properties ); 209 $this->assertArrayHasKey( 'visibility', $properties ); 209 210 $this->assertArrayHasKey( 'rest_base', $properties ); 210 211 } … … 240 241 $this->assertEquals( $tax_obj->labels, $data['labels'] ); 241 242 $this->assertEquals( $tax_obj->show_tagcloud, $data['show_cloud'] ); 243 244 $this->assertEquals( $tax_obj->public, $data['visibility']['public'] ); 245 $this->assertEquals( $tax_obj->publicly_queryable, $data['visibility']['publicly_queryable'] ); 246 $this->assertEquals( $tax_obj->show_admin_column, $data['visibility']['show_admin_column'] ); 247 $this->assertEquals( $tax_obj->show_in_nav_menus, $data['visibility']['show_in_nav_menus'] ); 248 $this->assertEquals( $tax_obj->show_in_quick_edit, $data['visibility']['show_in_quick_edit'] ); 249 $this->assertEquals( $tax_obj->show_ui, $data['visibility']['show_ui'] ); 242 250 } else { 243 251 $this->assertFalse( isset( $data['capabilities'] ) ); 244 252 $this->assertFalse( isset( $data['labels'] ) ); 245 253 $this->assertFalse( isset( $data['show_cloud'] ) ); 254 $this->assertFalse( isset( $data['visibility'] ) ); 246 255 } 247 256 }
Note: See TracChangeset
for help on using the changeset viewer.