- Timestamp:
- 10/31/2021 05:17:53 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-post-types-controller.php
r51397 r51959 145 145 $data = $response->get_data(); 146 146 $properties = $data['schema']['properties']; 147 $this->assertCount( 1 0, $properties );147 $this->assertCount( 11, $properties ); 148 148 $this->assertArrayHasKey( 'capabilities', $properties ); 149 149 $this->assertArrayHasKey( 'description', $properties ); … … 156 156 $this->assertArrayHasKey( 'taxonomies', $properties ); 157 157 $this->assertArrayHasKey( 'rest_base', $properties ); 158 $this->assertArrayHasKey( 'visibility', $properties ); 158 159 } 159 160 … … 217 218 } 218 219 $this->assertSame( $viewable, $data['viewable'] ); 220 $visibility = array( 221 'show_in_nav_menus' => (bool) $post_type_obj->show_in_nav_menus, 222 'show_ui' => (bool) $post_type_obj->show_ui, 223 ); 224 $this->assertSame( $visibility, $data['visibility'] ); 219 225 $this->assertSame( get_all_post_type_supports( $post_type_obj->name ), $data['supports'] ); 220 226 } else {
Note: See TracChangeset
for help on using the changeset viewer.