Make WordPress Core


Ignore:
Timestamp:
08/22/2017 03:07:42 PM (7 years ago)
Author:
johnbillion
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/customize/manager.php

    r41244 r41293  
    15451545     */
    15461546    function test_doing_ajax() {
    1547         if ( ! defined( 'DOING_AJAX' ) ) {
    1548             define( 'DOING_AJAX', true );
    1549         }
     1547        add_filter( 'wp_doing_ajax', '__return_true' );
    15501548
    15511549        $manager = $this->manager;
     
    15611559     */
    15621560    function test_not_doing_ajax() {
    1563         if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
    1564             $this->markTestSkipped( 'Cannot test when DOING_AJAX' );
    1565         }
     1561        add_filter( 'wp_doing_ajax', '__return_false' );
    15661562
    15671563        $manager = $this->manager;
Note: See TracChangeset for help on using the changeset viewer.