wordpress-develop/tests/phpunit/tests/ajax
Peter Wilson 733a81d74d Comments: Check if wp_new_comment() returns an error.
Adds checks throughout to allow for `wp_new_comment()` returning a `WP_Error` instance.

Updates the docs for the `pre_comment_approved` filter to include that it can be passed an error.

Props enrico.sorcinelli, ryotsun.
Fixes #39730.



git-svn-id: https://develop.svn.wordpress.org/trunk@41980 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-23 22:11:11 +00:00
..
Attachments.php Media: Remove an extra quote when sending a link of a media file to the editor. 2016-04-21 21:20:26 +00:00
Autosave.php Unit Tests: 2016-08-27 08:35:16 +00:00
Compression.php Build/Test Tools: Pass correct $message argument to WP_UnitTestCase::setExpectedException() in Tests_Ajax_CompressionTest::test_logged_out() and Tests_Ajax_TagSearch::test_no_results(). 2017-10-16 04:05:29 +00:00
CustomizeManager.php Customize: Add changeset locking in Customizer to prevent users from overriding each other's changes. 2017-10-12 04:00:15 +00:00
CustomizeMenus.php Customize: Allow post/page stubs to be edited in WP Admin as "customization drafts" when changeset is saved as draft or scheduled. 2017-10-17 20:14:56 +00:00
DeleteComment.php Unit Tests: 2016-08-27 08:35:16 +00:00
DeletePlugin.php Plugins: Move capability checks further up in wp_ajax_update_plugin() and wp_ajax_delete_plugin(). 2016-07-27 17:42:01 +00:00
DimComment.php Unit Tests: Remove an unused parameter from Tests_Ajax_DimComment::test_with_bad_id(). 2016-07-04 19:07:21 +00:00
EditComment.php Unit Tests: after [35225], make factory a method/getter on WP_UnitTestCase and add magic methods for BC for every plugin that is extending WP_UnitTestCase and accessing the $factory instance prop. 2015-10-17 18:02:16 +00:00
GetComments.php Unit Tests: 2016-08-27 08:35:16 +00:00
ManageThemes.php Upgrade/Install: Update unit tests after [41611]. 2017-09-27 15:14:53 +00:00
MediaEdit.php Build/Test Tools: Utilise assertFileExists() and assertFileNotExists() in more places. 2016-11-08 23:49:11 +00:00
QuickEdit.php Unit Tests: Change some @group annotations to @ticket. 2016-07-04 20:24:52 +00:00
ReplytoComment.php Comments: Check if wp_new_comment() returns an error. 2017-10-23 22:11:11 +00:00
Response.php Build/Test tools: Remove usage of DOING_AJAX from the test suite, so all tests that expect either an Ajax request or a 2017-08-22 15:07:42 +00:00
TagSearch.php Build/Test Tools: Pass correct $message argument to WP_UnitTestCase::setExpectedException() in Tests_Ajax_CompressionTest::test_logged_out() and Tests_Ajax_TagSearch::test_no_results(). 2017-10-16 04:05:29 +00:00
UpdatePlugin.php Plugins: Move capability checks further up in wp_ajax_update_plugin() and wp_ajax_delete_plugin(). 2016-07-27 17:42:01 +00:00