Changeset 3227
- Timestamp:
- 05/24/2016 07:27:09 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/tests/phpunit/tests/wporg-plugin-api.php
- Property svn:executable deleted
r3211 r3227 31 31 'icons' => true, 32 32 'active_installs' => true, 33 'group' => true,34 33 'contributors' => true, 35 34 ); … … 152 151 $plugins = plugins_api( 'query_plugins', array( 'local' => 'hello', 'fields' => $this->fields ) ); 153 152 $this->_check_response_plugin_query( $plugins, 1 ); 154 }155 156 function test_plugins_api_function_action_hot_categories() {157 $number = 2;158 $plugins = plugins_api( 'hot_categories', array( 'number' => $number ) );159 160 $this->assertEquals( $number, count( $plugins ) );161 $this->assertInternalType( 'array', $plugins, 'Response array is array' );162 163 foreach ( $plugins as $hot_category => $category_array ) {164 $this->assertInternalType( 'array', $category_array, 'Category array is array' );165 $this->assertArrayHasKey( 'name', $category_array, 'Name exists' );166 $this->assertArrayHasKey( 'slug', $category_array, 'Slug exists' );167 168 // Only check the first result.169 break;170 }171 153 } 172 154
Note: See TracChangeset
for help on using the changeset viewer.