Make WordPress Core

Changeset 41870


Ignore:
Timestamp:
10/16/2017 04:05:29 AM (7 years ago)
Author:
SergeyBiryukov
Message:

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().

PHPUnit 6.4.1 and earlier versions ignored the '0' value, causing the issue to go unnoticed.

Fixes #42232.

Location:
trunk/tests/phpunit/tests/ajax
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/ajax/Compression.php

    r40544 r41870  
    2626
    2727        // Make the request
    28         $this->setExpectedException( 'WPAjaxDieStopException', '0' );
     28        $this->setExpectedException( 'WPAjaxDieStopException', '-1' );
    2929        $this->_handleAjax( 'wp-compression-test' );
    3030    }
  • trunk/tests/phpunit/tests/ajax/TagSearch.php

    r38398 r41870  
    6969        // Make the request
    7070        // No output, so we get a stop exception
    71         $this->setExpectedException( 'WPAjaxDieStopException', '0' );
     71        $this->setExpectedException( 'WPAjaxDieStopException', '' );
    7272        $this->_handleAjax( 'ajax-tag-search' );
    7373    }
Note: See TracChangeset for help on using the changeset viewer.