Build/Test tools: Remove usage of DOING_AJAX from the test suite, so all tests that expect either an Ajax request or a

non-Ajax request can operate without being skipped.

Props Mte90

Fixes #41561


git-svn-id: https://develop.svn.wordpress.org/trunk@41293 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn
2017-08-22 15:07:42 +00:00
parent 3eff05cb88
commit e7e9e5b3fb
4 changed files with 6 additions and 15 deletions
+1 -3
View File
@@ -59,9 +59,7 @@ abstract class WP_Ajax_UnitTestCase extends WP_UnitTestCase {
);
public static function setUpBeforeClass() {
if ( ! defined( 'DOING_AJAX' ) ) {
define( 'DOING_AJAX', true );
}
add_filter( 'wp_doing_ajax', '__return_true' );
remove_action( 'admin_init', '_maybe_update_core' );
remove_action( 'admin_init', '_maybe_update_plugins' );