Make WordPress Core

Changeset 42055


Ignore:
Timestamp:
10/31/2017 09:13:09 AM (6 years ago)
Author:
pento
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.

Merge of [41870] to the 4.4 branch.

Props SergeyBiryukov.
Fixes #42232.

Location:
branches/4.4
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/4.4

  • branches/4.4/tests/phpunit/tests/ajax/Compression.php

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

    r35311 r42055  
    7575        // Make the request
    7676        // No output, so we get a stop exception
    77         $this->setExpectedException( 'WPAjaxDieStopException', '0' );
     77        $this->setExpectedException( 'WPAjaxDieStopException', '' );
    7878        $this->_handleAjax( 'ajax-tag-search' );
    7979    }
Note: See TracChangeset for help on using the changeset viewer.