Changed
- The
Test\BeforeFirstTestMethodCalled,Test\BeforeTestMethodCalled,Test\PreConditionCalled,Test\PostConditionCalled,Test\AfterTestMethodCalled, andTest\AfterLastTestMethodCalledevents are now emitted before the hook method is invoked, not after it has returned: events that are emitted while a hook method is running, for instance for an issue that it triggers, now follow the event for that hook method
Fixed
- Deprecations, notices, and warnings that are suppressed using the
@operator, or that are ignored by the baseline, are reported, and can make the test runner exit with a shell exit code that indicates failure, when they are triggered outside of tests, for instance when a test file is loaded - The test runner crashes (
An error occurred inside PHPUnit.) when the socket that is configured as the target of--log-json,--log-junit,--log-teamcity,--testdox-html, or--testdox-text(or of their counterparts in the XML configuration file) cannot be opened: a test runner warning is now triggered and the logfile is not written - When
--allis used and a default test suite is configured using thedefaultTestSuiteattribute in the XML configuration file, the bootstrap scripts that are configured for the other test suites are not loaded although the tests of these test suites are run - The schema for the XML configuration file (
phpunit.xsd) states0as the default value of thedefaultTimeLimitattribute although the default value is1 - The logfile in Open Test Reporting XML format does not finish the test suites that were running when a test run is stopped because it did not end after its time limit (
--timeout) was exceeded: these test suites are now reported as aborted, together with the reason why the test run was stopped - The message that a test run was interrupted by a signal, or that its time limit (
--timeout) was exceeded, is not separated from the output that follows it when no test was run --warm-coverage-cachealways caches the result of the static analysis that determines the executable lines of a file from its syntax, also when a test run with the same configuration determines them from the bytecode of the file: the first test run then performs and caches the static analysis again- The schema for the XML configuration file (
phpunit.xsd) statesvar(--bs-gray-200)andvar(--bs-gray-800)as the default values of thecolorBreadcrumbsandcolorBreadcrumbsDarkattributes although the default values are#eef1f5and#22272e - The
phaseof the observation in the result of the test run in JSON format is wrong or missing when the PHP process ends while a before-test method, a pre-condition method, a post-condition method, or an after-test method is running - The
phaseof the observation in the result of the test run in JSON format ispost-conditioninstead oftestwhen an expectation for the output of a test is not met and the test class has a post-condition method
Learn how to install or update PHPUnit 13.5 in the documentation.
Keep up to date with PHPUnit:
- You can follow @phpunit@phpc.social to stay up to date with PHPUnit's development.
- You can subscribe to the PHPUnit Updates newsletter to receive updates about and tips for PHPUnit.