From db1b341dec9f11b22fa9071c0aa4c0e80676525a Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Thu, 23 Jun 2022 19:45:24 +0000 Subject: [PATCH] Build/Test Tools: Add missing @covers tags for the AJAX test group. Props pbeane, hellofromTonya, antonvlasenko, ironprogrammer, SergeyBiryukov, costdev. See #39265. git-svn-id: https://develop.svn.wordpress.org/trunk@53561 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/ajax/AddMeta.php | 24 ++++++++++++------- tests/phpunit/tests/ajax/AddTag.php | 8 +++++++ tests/phpunit/tests/ajax/Attachments.php | 7 ++++++ tests/phpunit/tests/ajax/Autosave.php | 6 +++++ tests/phpunit/tests/ajax/Compression.php | 14 +++++++++++ tests/phpunit/tests/ajax/CustomizeManager.php | 6 +++++ tests/phpunit/tests/ajax/CustomizeMenus.php | 15 ++++++++++++ tests/phpunit/tests/ajax/DeleteComment.php | 23 ++++++++++++++++++ tests/phpunit/tests/ajax/DeletePlugin.php | 5 ++++ tests/phpunit/tests/ajax/DimComment.php | 2 ++ tests/phpunit/tests/ajax/EditComment.php | 2 ++ tests/phpunit/tests/ajax/GetComments.php | 2 ++ tests/phpunit/tests/ajax/ManageThemes.php | 2 ++ tests/phpunit/tests/ajax/MediaEdit.php | 8 +++++++ tests/phpunit/tests/ajax/QuickEdit.php | 3 +++ tests/phpunit/tests/ajax/ReplytoComment.php | 4 +++- tests/phpunit/tests/ajax/Response.php | 2 ++ tests/phpunit/tests/ajax/TagSearch.php | 2 ++ tests/phpunit/tests/ajax/UpdatePlugin.php | 2 ++ 19 files changed, 127 insertions(+), 10 deletions(-) diff --git a/tests/phpunit/tests/ajax/AddMeta.php b/tests/phpunit/tests/ajax/AddMeta.php index 12ec710a0d..caca5bba2a 100644 --- a/tests/phpunit/tests/ajax/AddMeta.php +++ b/tests/phpunit/tests/ajax/AddMeta.php @@ -13,15 +13,18 @@ require_once ABSPATH . 'wp-admin/includes/ajax-actions.php'; class Tests_Ajax_AddMeta extends WP_Ajax_UnitTestCase { /** * @ticket 43559 + * + * @covers ::add_post_meta + * @covers ::wp_ajax_add_meta */ public function test_post_add_meta_empty_is_allowed_ajax() { - $p = self::factory()->post->create(); + $post = self::factory()->post->create(); // Become an administrator. $this->_setRole( 'administrator' ); $_POST = array( - 'post_id' => $p, + 'post_id' => $post, 'metakeyinput' => 'testkey', 'metavalue' => '', '_ajax_nonce-add-meta' => wp_create_nonce( 'add-meta' ), @@ -34,25 +37,28 @@ class Tests_Ajax_AddMeta extends WP_Ajax_UnitTestCase { unset( $e ); } - $this->assertSame( '', get_post_meta( $p, 'testkey', true ) ); + $this->assertSame( '', get_post_meta( $post, 'testkey', true ) ); } /** * @ticket 43559 + * + * @covers ::update_metadata_by_mid + * @covers ::wp_ajax_add_meta */ - public function test_post_update_meta_empty_is_allowed_ajax() { - $p = self::factory()->post->create(); + public function test_update_metadata_by_mid_allows_empty_values_ajax() { + $post = self::factory()->post->create(); - $m = add_post_meta( $p, 'testkey', 'hello' ); + $meta_id = add_post_meta( $post, 'testkey', 'hello' ); // Become an administrator. $this->_setRole( 'administrator' ); $_POST = array( '_ajax_nonce-add-meta' => wp_create_nonce( 'add-meta' ), - 'post_id' => $p, + 'post_id' => $post, 'meta' => array( - $m => array( + $meta_id => array( 'key' => 'testkey', 'value' => '', ), @@ -66,6 +72,6 @@ class Tests_Ajax_AddMeta extends WP_Ajax_UnitTestCase { unset( $e ); } - $this->assertSame( '', get_post_meta( $p, 'testkey', true ) ); + $this->assertSame( '', get_post_meta( $post, 'testkey', true ) ); } } diff --git a/tests/phpunit/tests/ajax/AddTag.php b/tests/phpunit/tests/ajax/AddTag.php index 0095dcf261..cf10110d91 100755 --- a/tests/phpunit/tests/ajax/AddTag.php +++ b/tests/phpunit/tests/ajax/AddTag.php @@ -17,6 +17,9 @@ class Tests_Ajax_AddTag extends WP_Ajax_UnitTestCase { * * @ticket 42937 * + * @covers ::wp_ajax_add_tag + * @covers ::wp_insert_term + * * @param array $post_data Data to populate $_POST. * @param string $expected Expected response. * @param array|string|callable $callback Optional. Callback to register to 'term_updated_messages' @@ -90,6 +93,8 @@ class Tests_Ajax_AddTag extends WP_Ajax_UnitTestCase { /** * @ticket 42937 + * + * @covers ::wp_ajax_add_tag */ public function test_adding_category_without_capability_should_error() { $this->_setRole( 'subscriber' ); @@ -108,6 +113,9 @@ class Tests_Ajax_AddTag extends WP_Ajax_UnitTestCase { /** * @ticket 42937 + * + * @covers ::wp_ajax_add_tag + * @covers ::wp_insert_term */ public function test_adding_existing_category_should_error() { $this->_setRole( 'administrator' ); diff --git a/tests/phpunit/tests/ajax/Attachments.php b/tests/phpunit/tests/ajax/Attachments.php index 657213d278..baf7c7f4fc 100644 --- a/tests/phpunit/tests/ajax/Attachments.php +++ b/tests/phpunit/tests/ajax/Attachments.php @@ -12,6 +12,9 @@ require_once ABSPATH . 'wp-admin/includes/ajax-actions.php'; class Tests_Ajax_Attachments extends WP_Ajax_UnitTestCase { /** * @ticket 36578 + * + * @covers ::wp_ajax_send_attachment_to_editor + * @covers ::get_image_send_to_editor */ public function test_wp_ajax_send_attachment_to_editor_should_return_an_image() { // Become an administrator. @@ -64,8 +67,12 @@ class Tests_Ajax_Attachments extends WP_Ajax_UnitTestCase { /** * @ticket 36578 * @group ms-excluded + * + * @covers ::wp_ajax_send_attachment_to_editor */ public function test_wp_ajax_send_attachment_to_editor_should_return_a_link() { + $this->skipWithMultisite(); + // Become an administrator. $post = $_POST; $user_id = self::factory()->user->create( diff --git a/tests/phpunit/tests/ajax/Autosave.php b/tests/phpunit/tests/ajax/Autosave.php index 4966f392dc..a3c57070ef 100644 --- a/tests/phpunit/tests/ajax/Autosave.php +++ b/tests/phpunit/tests/ajax/Autosave.php @@ -43,6 +43,8 @@ class Tests_Ajax_Autosave extends WP_Ajax_UnitTestCase { /** * Tests autosaving a post. + * + * @covers ::wp_ajax_heartbeat */ public function test_autosave_post() { // The original post_author. @@ -84,6 +86,8 @@ class Tests_Ajax_Autosave extends WP_Ajax_UnitTestCase { /** * Tests autosaving a locked post. + * + * @covers ::wp_ajax_heartbeat */ public function test_autosave_locked_post() { // Lock the post to another user. @@ -135,6 +139,8 @@ class Tests_Ajax_Autosave extends WP_Ajax_UnitTestCase { /** * Tests with an invalid nonce. + * + * @covers ::wp_ajax_heartbeat */ public function test_with_invalid_nonce() { diff --git a/tests/phpunit/tests/ajax/Compression.php b/tests/phpunit/tests/ajax/Compression.php index e900b85375..4de6c2d154 100644 --- a/tests/phpunit/tests/ajax/Compression.php +++ b/tests/phpunit/tests/ajax/Compression.php @@ -17,6 +17,8 @@ class Tests_Ajax_CompressionTest extends WP_Ajax_UnitTestCase { /** * Test as a logged out user + * + * @covers ::wp_ajax_wp_compression_test */ public function test_logged_out() { $this->logout(); @@ -32,6 +34,8 @@ class Tests_Ajax_CompressionTest extends WP_Ajax_UnitTestCase { /** * Fetch the test text + * + * @covers ::wp_ajax_wp_compression_test */ public function test_text() { @@ -56,6 +60,8 @@ class Tests_Ajax_CompressionTest extends WP_Ajax_UnitTestCase { * Fetch the test text (gzdeflate) * * @requires function gzdeflate + * + * @covers ::wp_ajax_wp_compression_test */ public function test_gzdeflate() { @@ -81,6 +87,8 @@ class Tests_Ajax_CompressionTest extends WP_Ajax_UnitTestCase { * Fetch the test text (gzencode) * * @requires function gzencode + * + * @covers ::wp_ajax_wp_compression_test */ public function test_gzencode() { @@ -104,6 +112,8 @@ class Tests_Ajax_CompressionTest extends WP_Ajax_UnitTestCase { /** * Fetch the test text (unknown encoding) + * + * @covers ::wp_ajax_wp_compression_test */ public function test_unknown_encoding() { @@ -122,6 +132,8 @@ class Tests_Ajax_CompressionTest extends WP_Ajax_UnitTestCase { /** * Set the 'can_compress_scripts' site option to true + * + * @covers ::wp_ajax_wp_compression_test */ public function test_set_yes() { @@ -160,6 +172,8 @@ class Tests_Ajax_CompressionTest extends WP_Ajax_UnitTestCase { /** * Set the 'can_compress_scripts' site option to false + * + * @covers ::wp_ajax_wp_compression_test */ public function test_set_no() { diff --git a/tests/phpunit/tests/ajax/CustomizeManager.php b/tests/phpunit/tests/ajax/CustomizeManager.php index 82dcc13c67..7300bb5ed0 100644 --- a/tests/phpunit/tests/ajax/CustomizeManager.php +++ b/tests/phpunit/tests/ajax/CustomizeManager.php @@ -103,6 +103,7 @@ class Tests_Ajax_CustomizeManager extends WP_Ajax_UnitTestCase { * Test WP_Customize_Manager::save(). * * @ticket 30937 + * * @covers WP_Customize_Manager::save */ public function test_save_failures() { @@ -270,6 +271,7 @@ class Tests_Ajax_CustomizeManager extends WP_Ajax_UnitTestCase { * Test WP_Customize_Manager::save(). * * @ticket 30937 + * * @covers WP_Customize_Manager::save */ public function test_save_success_publish_create() { @@ -299,6 +301,7 @@ class Tests_Ajax_CustomizeManager extends WP_Ajax_UnitTestCase { * Test WP_Customize_Manager::save(). * * @ticket 30937 + * * @covers WP_Customize_Manager::save */ public function test_save_success_publish_edit() { @@ -338,6 +341,7 @@ class Tests_Ajax_CustomizeManager extends WP_Ajax_UnitTestCase { * Test WP_Customize_Manager::save(). * * @ticket 38943 + * * @covers WP_Customize_Manager::save */ public function test_success_save_post_date() { @@ -436,6 +440,7 @@ class Tests_Ajax_CustomizeManager extends WP_Ajax_UnitTestCase { * Test WP_Customize_Manager::save(). * * @ticket 39896 + * * @covers WP_Customize_Manager::save */ public function test_save_autosave() { @@ -482,6 +487,7 @@ class Tests_Ajax_CustomizeManager extends WP_Ajax_UnitTestCase { * Test request for trashing a changeset. * * @ticket 39896 + * * @covers WP_Customize_Manager::handle_changeset_trash_request */ public function test_handle_changeset_trash_request() { diff --git a/tests/phpunit/tests/ajax/CustomizeMenus.php b/tests/phpunit/tests/ajax/CustomizeMenus.php index 7acc29ae80..33c0d94e92 100644 --- a/tests/phpunit/tests/ajax/CustomizeMenus.php +++ b/tests/phpunit/tests/ajax/CustomizeMenus.php @@ -79,6 +79,8 @@ class Tests_Ajax_CustomizeMenus extends WP_Ajax_UnitTestCase { * * @param string $role The role we're checking caps against. * @param array $expected_results Expected results. + * + * @covers WP_Customize_Nav_Menus::ajax_load_available_items */ public function test_ajax_load_available_items_cap_check( $role, $expected_results ) { @@ -157,6 +159,8 @@ class Tests_Ajax_CustomizeMenus extends WP_Ajax_UnitTestCase { * * @param array $post_args POST args. * @param mixed $expected_results Expected results. + * + * @covers WP_Customize_Nav_Menus::ajax_load_available_items */ public function test_ajax_load_available_items_error_messages( $post_args, $expected_results ) { @@ -267,6 +271,8 @@ class Tests_Ajax_CustomizeMenus extends WP_Ajax_UnitTestCase { * * @param array $post_args POST args. * @param array $success_status Success status. + * + * @covers WP_Customize_Nav_Menus::ajax_load_available_items */ public function test_ajax_load_available_items_success_status( $post_args, $success_status ) { @@ -357,6 +363,8 @@ class Tests_Ajax_CustomizeMenus extends WP_Ajax_UnitTestCase { * @dataProvider data_ajax_load_available_items_structure * * @param array $post_args POST args. + * + * @covers WP_Customize_Nav_Menus::ajax_load_available_items */ public function test2_ajax_load_available_items_structure( $post_args ) { do_action( 'customize_register', $this->wp_customize ); @@ -466,6 +474,9 @@ class Tests_Ajax_CustomizeMenus extends WP_Ajax_UnitTestCase { * * @param string $role Role. * @param array $expected_results Expected results. + * + * @covers WP_Customize_Nav_Menus::ajax_search_available_items + * @covers WP_Customize_Nav_Menus::search_available_items_query */ public function test_ajax_search_available_items_caps_check( $role, $expected_results ) { @@ -545,6 +556,9 @@ class Tests_Ajax_CustomizeMenus extends WP_Ajax_UnitTestCase { * * @param array $post_args POST args. * @param array $expected_results Expected results. + * + * @covers WP_Customize_Nav_Menus::ajax_search_available_items + * @covers WP_Customize_Nav_Menus::search_available_items_query */ public function test_ajax_search_available_items_results( $post_args, $expected_results ) { do_action( 'customize_register', $this->wp_customize ); @@ -638,6 +652,7 @@ class Tests_Ajax_CustomizeMenus extends WP_Ajax_UnitTestCase { * Testing successful ajax_insert_auto_draft_post() call. * * @covers WP_Customize_Nav_Menus::ajax_insert_auto_draft_post + * @covers WP_Customize_Nav_Menus::insert_auto_draft_post */ public function test_ajax_insert_auto_draft_post_success() { $_POST = wp_slash( diff --git a/tests/phpunit/tests/ajax/DeleteComment.php b/tests/phpunit/tests/ajax/DeleteComment.php index bd38671b0d..c902752063 100644 --- a/tests/phpunit/tests/ajax/DeleteComment.php +++ b/tests/phpunit/tests/ajax/DeleteComment.php @@ -59,6 +59,9 @@ class Tests_Ajax_DeleteComment extends WP_Ajax_UnitTestCase { * * @param WP_Comment $comment Comment object. * @param string $action Action: 'trash', 'untrash', etc. + * + * @covers ::wp_ajax_delete_comment + * @covers ::_wp_ajax_delete_comment_response */ public function _test_as_admin( $comment, $action ) { @@ -118,6 +121,8 @@ class Tests_Ajax_DeleteComment extends WP_Ajax_UnitTestCase { * * @param WP_Comment $comment Comment object. * @param string $action Action: 'trash', 'untrash', etc. + * + * @covers ::wp_ajax_delete_comment */ public function _test_as_subscriber( $comment, $action ) { @@ -150,6 +155,8 @@ class Tests_Ajax_DeleteComment extends WP_Ajax_UnitTestCase { * * @param WP_Comment $comment Comment object. * @param string $action Action: 'trash', 'untrash', etc. + * + * @covers ::wp_ajax_delete_comment */ public function _test_with_bad_nonce( $comment, $action ) { @@ -181,6 +188,8 @@ class Tests_Ajax_DeleteComment extends WP_Ajax_UnitTestCase { * * @param WP_Comment $comment Comment object. * @param string $action Action: 'trash', 'untrash', etc. + * + * @covers ::wp_ajax_delete_comment */ public function _test_with_bad_id( $comment, $action ) { @@ -218,6 +227,8 @@ class Tests_Ajax_DeleteComment extends WP_Ajax_UnitTestCase { * * @param WP_Comment $comment Comment object. * @param string $action Action: 'trash', 'untrash', etc. + * + * @covers ::wp_ajax_delete_comment */ public function _test_double_action( $comment, $action ) { @@ -263,6 +274,9 @@ class Tests_Ajax_DeleteComment extends WP_Ajax_UnitTestCase { /** * Deletes a comment as an administrator (expects success). + * + * @covers ::wp_ajax_delete_comment + * @covers ::_wp_ajax_delete_comment_response */ public function test_ajax_comment_trash_actions_as_administrator() { // Test trash/untrash. @@ -279,6 +293,8 @@ class Tests_Ajax_DeleteComment extends WP_Ajax_UnitTestCase { /** * Deletes a comment as a subscriber (expects permission denied). + * + * @covers ::wp_ajax_delete_comment */ public function test_ajax_comment_trash_actions_as_subscriber() { // Test trash/untrash. @@ -295,6 +311,9 @@ class Tests_Ajax_DeleteComment extends WP_Ajax_UnitTestCase { /** * Deletes a comment with no ID. + * + * @covers ::wp_ajax_delete_comment + * @covers ::_wp_ajax_delete_comment_response */ public function test_ajax_trash_comment_no_id() { // Test trash/untrash. @@ -311,6 +330,8 @@ class Tests_Ajax_DeleteComment extends WP_Ajax_UnitTestCase { /** * Deletes a comment with a bad nonce. + * + * @covers ::wp_ajax_delete_comment */ public function test_ajax_trash_comment_bad_nonce() { // Test trash/untrash. @@ -327,6 +348,8 @@ class Tests_Ajax_DeleteComment extends WP_Ajax_UnitTestCase { /** * Tests trashing an already trashed comment, etc. + * + * @covers ::wp_ajax_delete_comment */ public function test_ajax_trash_double_action() { // Test trash/untrash. diff --git a/tests/phpunit/tests/ajax/DeletePlugin.php b/tests/phpunit/tests/ajax/DeletePlugin.php index c42e238499..57a66a0dbf 100644 --- a/tests/phpunit/tests/ajax/DeletePlugin.php +++ b/tests/phpunit/tests/ajax/DeletePlugin.php @@ -8,6 +8,8 @@ require_once ABSPATH . 'wp-admin/includes/ajax-actions.php'; * Testing Ajax handler for deleting a plugin. * * @group ajax + * + * @covers ::wp_ajax_delete_plugin */ class Tests_Ajax_Delete_Plugin extends WP_Ajax_UnitTestCase { @@ -127,6 +129,9 @@ class Tests_Ajax_Delete_Plugin extends WP_Ajax_UnitTestCase { /** * @group ms-excluded + * + * @covers ::wp_ajax_delete_plugin + * @covers ::delete_plugins */ public function test_delete_plugin() { $this->_setRole( 'administrator' ); diff --git a/tests/phpunit/tests/ajax/DimComment.php b/tests/phpunit/tests/ajax/DimComment.php index 05e6808bfc..6881279e07 100644 --- a/tests/phpunit/tests/ajax/DimComment.php +++ b/tests/phpunit/tests/ajax/DimComment.php @@ -12,6 +12,8 @@ require_once ABSPATH . 'wp-admin/includes/ajax-actions.php'; * @subpackage UnitTests * @since 3.4.0 * @group ajax + * + * @covers ::wp_ajax_dim_comment */ class Tests_Ajax_DimComment extends WP_Ajax_UnitTestCase { diff --git a/tests/phpunit/tests/ajax/EditComment.php b/tests/phpunit/tests/ajax/EditComment.php index d5b569d388..fba7bd46a3 100644 --- a/tests/phpunit/tests/ajax/EditComment.php +++ b/tests/phpunit/tests/ajax/EditComment.php @@ -12,6 +12,8 @@ require_once ABSPATH . 'wp-admin/includes/ajax-actions.php'; * @subpackage UnitTests * @since 3.4.0 * @group ajax + * + * @covers ::wp_ajax_edit_comment */ class Tests_Ajax_EditComment extends WP_Ajax_UnitTestCase { diff --git a/tests/phpunit/tests/ajax/GetComments.php b/tests/phpunit/tests/ajax/GetComments.php index 6649e30dab..a828aa3df6 100644 --- a/tests/phpunit/tests/ajax/GetComments.php +++ b/tests/phpunit/tests/ajax/GetComments.php @@ -12,6 +12,8 @@ require_once ABSPATH . 'wp-admin/includes/ajax-actions.php'; * @subpackage UnitTests * @since 3.4.0 * @group ajax + * + * @covers ::wp_ajax_get_comments */ class Tests_Ajax_GetComments extends WP_Ajax_UnitTestCase { diff --git a/tests/phpunit/tests/ajax/ManageThemes.php b/tests/phpunit/tests/ajax/ManageThemes.php index 015c140d83..f689515fe3 100644 --- a/tests/phpunit/tests/ajax/ManageThemes.php +++ b/tests/phpunit/tests/ajax/ManageThemes.php @@ -8,6 +8,8 @@ require_once ABSPATH . 'wp-admin/includes/ajax-actions.php'; * Testing Ajax handler for instlaling, updating, and deleting themes. * * @group ajax + * + * @covers ::wp_ajax_update_theme */ class Tests_Ajax_Manage_Themes extends WP_Ajax_UnitTestCase { private $orig_theme_dir; diff --git a/tests/phpunit/tests/ajax/MediaEdit.php b/tests/phpunit/tests/ajax/MediaEdit.php index d42ef09203..686dae08c5 100644 --- a/tests/phpunit/tests/ajax/MediaEdit.php +++ b/tests/phpunit/tests/ajax/MediaEdit.php @@ -27,6 +27,10 @@ class Tests_Ajax_MediaEdit extends WP_Ajax_UnitTestCase { /** * @ticket 22985 + * @requires function imagejpeg + * + * @covers ::wp_insert_attachment + * @covers ::wp_save_image */ public function testCropImageThumbnail() { require_once ABSPATH . 'wp-admin/includes/image-edit.php'; @@ -56,6 +60,10 @@ class Tests_Ajax_MediaEdit extends WP_Ajax_UnitTestCase { /** * @ticket 32171 + * @requires function imagejpeg + * + * @covers ::wp_insert_attachment + * @covers ::wp_save_image */ public function testImageEditOverwriteConstant() { define( 'IMAGE_EDIT_OVERWRITE', true ); diff --git a/tests/phpunit/tests/ajax/QuickEdit.php b/tests/phpunit/tests/ajax/QuickEdit.php index 2369930cfb..d94f3d6cb2 100644 --- a/tests/phpunit/tests/ajax/QuickEdit.php +++ b/tests/phpunit/tests/ajax/QuickEdit.php @@ -14,6 +14,9 @@ class Tests_Ajax_QuickEdit extends WP_Ajax_UnitTestCase { /** * @ticket 26948 + * + * @covers ::wp_ajax_inline_save + * @covers ::edit_post */ public function test_dont_process_terms_if_taxonomy_does_not_allow_show_on_quick_edit() { register_taxonomy( diff --git a/tests/phpunit/tests/ajax/ReplytoComment.php b/tests/phpunit/tests/ajax/ReplytoComment.php index e652ede2a3..3db36b478f 100644 --- a/tests/phpunit/tests/ajax/ReplytoComment.php +++ b/tests/phpunit/tests/ajax/ReplytoComment.php @@ -12,6 +12,8 @@ require_once ABSPATH . 'wp-admin/includes/ajax-actions.php'; * @subpackage UnitTests * @since 3.4.0 * @group ajax + * + * @covers ::wp_ajax_replyto_comment */ class Tests_Ajax_ReplytoComment extends WP_Ajax_UnitTestCase { @@ -186,7 +188,7 @@ class Tests_Ajax_ReplytoComment extends WP_Ajax_UnitTestCase { // Make the request. $this->expectException( 'WPAjaxDieStopException' ); - $this->expectExceptionMessage( 'You cannot reply to a comment on a draft post.' ); + $this->expectExceptionMessage( 'Error: You cannot reply to a comment on a draft post.' ); $this->_handleAjax( 'replyto-comment' ); } diff --git a/tests/phpunit/tests/ajax/Response.php b/tests/phpunit/tests/ajax/Response.php index 986c0971da..bf3335ad98 100644 --- a/tests/phpunit/tests/ajax/Response.php +++ b/tests/phpunit/tests/ajax/Response.php @@ -6,6 +6,8 @@ * @subpackage UnitTests * @since 3.5.0 * @group ajax + * + * @covers WP_Ajax_Response::send */ class Tests_Ajax_Response extends WP_UnitTestCase { diff --git a/tests/phpunit/tests/ajax/TagSearch.php b/tests/phpunit/tests/ajax/TagSearch.php index 971c8cb995..a70a1d6964 100644 --- a/tests/phpunit/tests/ajax/TagSearch.php +++ b/tests/phpunit/tests/ajax/TagSearch.php @@ -12,6 +12,8 @@ require_once ABSPATH . 'wp-admin/includes/ajax-actions.php'; * @subpackage UnitTests * @since 3.4.0 * @group ajax + * + * @covers ::wp_ajax_ajax_tag_search */ class Tests_Ajax_TagSearch extends WP_Ajax_UnitTestCase { diff --git a/tests/phpunit/tests/ajax/UpdatePlugin.php b/tests/phpunit/tests/ajax/UpdatePlugin.php index 44ce630633..07ab868ea3 100644 --- a/tests/phpunit/tests/ajax/UpdatePlugin.php +++ b/tests/phpunit/tests/ajax/UpdatePlugin.php @@ -8,6 +8,8 @@ require_once ABSPATH . 'wp-admin/includes/ajax-actions.php'; * Testing Ajax handler for updating a plugin. * * @group ajax + * + * @covers ::wp_ajax_update_plugin */ class Tests_Ajax_Update_Plugin extends WP_Ajax_UnitTestCase {