Changeset 51331 for trunk/tests/phpunit/tests/xmlrpc/wp/getPostType.php
- Timestamp:
- 07/05/2021 05:21:53 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/xmlrpc/wp/getPostType.php
r50463 r51331 60 60 61 61 // Check data types. 62 $this->assertI nternalType( 'string',$result['name'] );63 $this->assertI nternalType( 'string',$result['label'] );64 $this->assertI nternalType( 'bool',$result['hierarchical'] );65 $this->assertI nternalType( 'bool',$result['public'] );66 $this->assertI nternalType( 'bool',$result['_builtin'] );67 $this->assertI nternalType( 'bool',$result['map_meta_cap'] );68 $this->assertI nternalType( 'bool',$result['has_archive'] );69 $this->assertI nternalType( 'bool',$result['show_ui'] );70 $this->assertI nternalType( 'int',$result['menu_position'] );71 $this->assertI nternalType( 'string',$result['menu_icon'] );72 $this->assertI nternalType( 'array',$result['labels'] );73 $this->assertI nternalType( 'array',$result['cap'] );74 $this->assertI nternalType( 'array',$result['taxonomies'] );75 $this->assertI nternalType( 'array',$result['supports'] );62 $this->assertIsString( $result['name'] ); 63 $this->assertIsString( $result['label'] ); 64 $this->assertIsBool( $result['hierarchical'] ); 65 $this->assertIsBool( $result['public'] ); 66 $this->assertIsBool( $result['_builtin'] ); 67 $this->assertIsBool( $result['map_meta_cap'] ); 68 $this->assertIsBool( $result['has_archive'] ); 69 $this->assertIsBool( $result['show_ui'] ); 70 $this->assertIsInt( $result['menu_position'] ); 71 $this->assertIsString( $result['menu_icon'] ); 72 $this->assertIsArray( $result['labels'] ); 73 $this->assertIsArray( $result['cap'] ); 74 $this->assertIsArray( $result['taxonomies'] ); 75 $this->assertIsArray( $result['supports'] ); 76 76 77 77 // Check label data types. 78 $this->assertI nternalType( 'string',$result['labels']['name'] );79 $this->assertI nternalType( 'string',$result['labels']['singular_name'] );80 $this->assertI nternalType( 'string',$result['labels']['add_new'] );81 $this->assertI nternalType( 'string',$result['labels']['add_new_item'] );82 $this->assertI nternalType( 'string',$result['labels']['edit_item'] );83 $this->assertI nternalType( 'string',$result['labels']['new_item'] );84 $this->assertI nternalType( 'string',$result['labels']['view_item'] );85 $this->assertI nternalType( 'string',$result['labels']['search_items'] );86 $this->assertI nternalType( 'string',$result['labels']['not_found'] );87 $this->assertI nternalType( 'string',$result['labels']['not_found_in_trash'] );88 $this->assertI nternalType( 'string',$result['labels']['parent_item_colon'] );89 $this->assertI nternalType( 'string',$result['labels']['all_items'] );90 $this->assertI nternalType( 'string',$result['labels']['menu_name'] );91 $this->assertI nternalType( 'string',$result['labels']['name_admin_bar'] );78 $this->assertIsString( $result['labels']['name'] ); 79 $this->assertIsString( $result['labels']['singular_name'] ); 80 $this->assertIsString( $result['labels']['add_new'] ); 81 $this->assertIsString( $result['labels']['add_new_item'] ); 82 $this->assertIsString( $result['labels']['edit_item'] ); 83 $this->assertIsString( $result['labels']['new_item'] ); 84 $this->assertIsString( $result['labels']['view_item'] ); 85 $this->assertIsString( $result['labels']['search_items'] ); 86 $this->assertIsString( $result['labels']['not_found'] ); 87 $this->assertIsString( $result['labels']['not_found_in_trash'] ); 88 $this->assertIsString( $result['labels']['parent_item_colon'] ); 89 $this->assertIsString( $result['labels']['all_items'] ); 90 $this->assertIsString( $result['labels']['menu_name'] ); 91 $this->assertIsString( $result['labels']['name_admin_bar'] ); 92 92 93 93 // Check cap data types. 94 $this->assertI nternalType( 'string',$result['cap']['edit_post'] );95 $this->assertI nternalType( 'string',$result['cap']['read_post'] );96 $this->assertI nternalType( 'string',$result['cap']['delete_post'] );97 $this->assertI nternalType( 'string',$result['cap']['edit_posts'] );98 $this->assertI nternalType( 'string',$result['cap']['edit_others_posts'] );99 $this->assertI nternalType( 'string',$result['cap']['publish_posts'] );100 $this->assertI nternalType( 'string',$result['cap']['read_private_posts'] );101 $this->assertI nternalType( 'string',$result['cap']['read'] );102 $this->assertI nternalType( 'string',$result['cap']['delete_posts'] );103 $this->assertI nternalType( 'string',$result['cap']['delete_private_posts'] );104 $this->assertI nternalType( 'string',$result['cap']['delete_published_posts'] );105 $this->assertI nternalType( 'string',$result['cap']['delete_others_posts'] );106 $this->assertI nternalType( 'string',$result['cap']['edit_private_posts'] );107 $this->assertI nternalType( 'string',$result['cap']['edit_published_posts'] );94 $this->assertIsString( $result['cap']['edit_post'] ); 95 $this->assertIsString( $result['cap']['read_post'] ); 96 $this->assertIsString( $result['cap']['delete_post'] ); 97 $this->assertIsString( $result['cap']['edit_posts'] ); 98 $this->assertIsString( $result['cap']['edit_others_posts'] ); 99 $this->assertIsString( $result['cap']['publish_posts'] ); 100 $this->assertIsString( $result['cap']['read_private_posts'] ); 101 $this->assertIsString( $result['cap']['read'] ); 102 $this->assertIsString( $result['cap']['delete_posts'] ); 103 $this->assertIsString( $result['cap']['delete_private_posts'] ); 104 $this->assertIsString( $result['cap']['delete_published_posts'] ); 105 $this->assertIsString( $result['cap']['delete_others_posts'] ); 106 $this->assertIsString( $result['cap']['edit_private_posts'] ); 107 $this->assertIsString( $result['cap']['edit_published_posts'] ); 108 108 109 109 // Check taxonomy data types. 110 110 foreach ( $result['taxonomies'] as $taxonomy ) { 111 $this->assertI nternalType( 'string',$taxonomy );111 $this->assertIsString( $taxonomy ); 112 112 } 113 113 114 114 // Check support data types. 115 115 foreach ( $result['supports'] as $key => $value ) { 116 $this->assertI nternalType( 'string',$key );117 $this->assertI nternalType( 'bool',$value );116 $this->assertIsString( $key ); 117 $this->assertIsBool( $value ); 118 118 } 119 119
Note: See TracChangeset
for help on using the changeset viewer.