Skip to content

Commit a722bac

Browse files
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. git-svn-id: https://develop.svn.wordpress.org/trunk@41870 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 97c5985 commit a722bac

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

tests/phpunit/tests/ajax/Compression.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function test_logged_out() {
2525
$_GET['test'] = 1;
2626

2727
// Make the request
28-
$this->setExpectedException( 'WPAjaxDieStopException', '0' );
28+
$this->setExpectedException( 'WPAjaxDieStopException', '-1' );
2929
$this->_handleAjax( 'wp-compression-test' );
3030
}
3131

tests/phpunit/tests/ajax/TagSearch.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function test_no_results() {
6868

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
}
7474

0 commit comments

Comments
 (0)