mirror of
git://develop.git.wordpress.org/
synced 2025-03-15 01:19:51 +01:00
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
This commit is contained in:
parent
32ee6cb39e
commit
db1b341dec
@ -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 ) );
|
||||
}
|
||||
}
|
||||
|
@ -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' );
|
||||
|
@ -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(
|
||||
|
@ -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() {
|
||||
|
||||
|
@ -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() {
|
||||
|
||||
|
@ -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() {
|
||||
|
@ -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(
|
||||
|
@ -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.
|
||||
|
@ -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' );
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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 );
|
||||
|
@ -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(
|
||||
|
@ -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' );
|
||||
}
|
||||
|
||||
|
@ -6,6 +6,8 @@
|
||||
* @subpackage UnitTests
|
||||
* @since 3.5.0
|
||||
* @group ajax
|
||||
*
|
||||
* @covers WP_Ajax_Response::send
|
||||
*/
|
||||
class Tests_Ajax_Response extends WP_UnitTestCase {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user