Opened 9 years ago
Closed 9 years ago
#42232 closed defect (bug) (fixed)
AJAX test failures with PHPUnit 6.4.2
| Reported by: | SergeyBiryukov | Owned by: | pento |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.9 |
| Component: | Build/Test Tools | Version: | |
| Severity: | normal | Keywords: | fixed-major |
| Cc: | Focuses: |
Description
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 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.
Change History (9)
This ticket was mentioned in Slack in #core by sergey. View the logs.
9 years ago
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 41870: