[wp-trac] [WordPress Trac] #41561: Remove usage of DOING_AJAX in the test suite

WordPress Trac noreply at wordpress.org
Wed Aug 16 20:38:11 UTC 2017


#41561: Remove usage of DOING_AJAX in the test suite
------------------------------+------------------
 Reporter:  johnbillion       |       Owner:
     Type:  enhancement       |      Status:  new
 Priority:  normal            |   Milestone:  4.9
Component:  Build/Test Tools  |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  has-patch         |     Focuses:
------------------------------+------------------
Changes (by johnbillion):

 * keywords:  has-patch dev-feedback => has-patch
 * milestone:  Awaiting Review => 4.9


Comment:

 @Mte90 Looks good!

 1. The `test_not_doing_ajax()` test can use `add_filter( 'wp_doing_ajax',
 '__return_false' )` to force a non-Ajax request, and then remove the
 `markTestSkipped` call.
 2. Does this cover all instances of `DOING_AJAX` in the test suite?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41561#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list