A release about trust: a green result now means more. Assertions no longer skip checks silently, parallel runs clean up after themselves, reports stay valid whatever your tests print, and the code coverage report got a thorough round of fixes. And yes, PHP 8.6 is supported.
✨ New Features
- TestCase::run() – no longer stops at the first failing method: every test method runs, results come first and the details of each failure follow (#469)
- Stack traces show the actual call arguments, so you immediately see which call failed –
redirect('https://…', 302)instead of a bareredirect() - PHP 8.6 support
🐛 Bug Fixes
- Assert::exception() and Assert::error() – an empty or
'0'message is now really checked instead of silently disabling the message check; passnullif you don't want to verify the message @phpVersion– boundaries and the==and!=operators now work as documented:@phpVersion 8.4.3runs on PHP 8.4.3,== 8.4.1runs only on 8.4.1 and!= 8.4.1everywhere else. Common forms like@phpVersion 8.1or< 8.4behave as before;==and!=compare the full version, so== 8.4matches no release@multiple–0or a non-numeric value is reported as an error instead of quietly running the test twice- --stop-on-fail with parallel jobs no longer returns while other tests are still running; Ctrl+C terminates running test processes and every output handler is always finalized
- Environment::lock() no longer eats into the test time limit while waiting for the lock on Windows
@httpCodereads the right status even when php-cgi prints a warning before the headers- Environment variables of the runner are restored after starting a test, and a Job works without a temp directory and keeps its stderr
- Dumper no longer changes data reachable through references while dumping it;
INFandNANare dumped as valid PHP - HttpAssert – with
follow: truethe headers come from the final response only, so theLocationof a redirect no longer leaks through; a header sent several times (e.g.Set-Cookie) is joined with a comma instead of keeping the last value; header existence checks count as assertions - Masks in Assert::match() – patterns with non-ASCII text match whole UTF-8 characters,
%f%rejects invalid numbers like.1.2, and a failing regular expression no longer leavespcre.backtrack_limitchanged - FileMock – appending through several handles, modes like
rb+andtouch()now behave like a real file - DomQuery –
[attr$="value"], attribute values containing quotes and selector lists likea, bon PHP < 8.4 work correctly - JUnit report stays well-formed XML even when test output contains control characters or invalid UTF-8, and failed tests are counted in the
failuresattribute instead oferrors(tools reading onlyerrorsnow see0) - Helpers::purge() refuses a path that resolves to the root directory, e.g. through
..or a symbolic link - Code coverage – the HTML report escapes file names, can be rendered repeatedly in one process, handles files with only dead code and numbers the last line of files without a trailing newline; Clover metrics include functions, enums and code outside classes; TAP or JUnit output on stdout is no longer polluted by the coverage summary, and
testerexits with code 1 when the requested report cannot be generated - Clearer error messages, e.g. "No assertions were executed in this test." instead of "This test forgets to execute an assertion.", and Assert::contains() keeps your custom description