[wp-trac] [WordPress Trac] #42232: AJAX test failures with PHPUnit 6.4.2

WordPress Trac noreply at wordpress.org
Mon Oct 16 03:58:48 UTC 2017


#42232: AJAX test failures with PHPUnit 6.4.2
------------------------------+-----------------
 Reporter:  SergeyBiryukov    |      Owner:
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  4.9
Component:  Build/Test Tools  |    Version:
 Severity:  normal            |   Keywords:
  Focuses:                    |
------------------------------+-----------------
 It looks like Travis has switched to PHPUnit 6.4.2, which caused two AJAX
 test failures:
 {{{
 There were 2 failures:
 1) Tests_Ajax_CompressionTest::test_logged_out
 Failed asserting that exception message '-1' contains '0'.
 2) Tests_Ajax_TagSearch::test_no_results
 Failed asserting that exception message '' contains '0'.
 }}}

 Traced this to
 [https://github.com/sebastianbergmann/phpunit/commit/6727744434bf19016364aef1a49f80b32d045b8b
 a recent change] in `TestCase::runTest()`.

 In 6.4.1 and earlier versions, `$this->setExpectedException(
 'WPAjaxDieStopException', '0' )` didn't work as expected due to a
 `!empty($this->expectedExceptionMessage)` check, the `$message` argument
 was just ignored.

 Now these assertions have actually started working and should be adjusted
 to make sure we expect correct results.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42232>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list