Repository navigation
Releases
Releases · nette/tester
Released version 2.7.0
Tester 2.7 makes itself at home in CI: failures land right in the pull request diff, hanging tests no longer hang the pipeline, and slow tests have nowhere to hide.
✨ New Features
- GitHub Actions annotations – the new
-o githuboutput marks failed tests directly in the PR diff view, and it switches on automatically when Tester runs on GitHub Actions, so there is nothing to configure - Test time limit –
--timeout <seconds>sets a limit for every test,@timeoutoverrides it per file; a test that runs over is terminated and reported as a failure instead of blocking the whole run --slowest– prints the 10 (or as many as you ask for) slowest tests after the run, so you know exactly where the time goes#[DataProvider]and#[Throws]attributes –TestCasemethods can now use PHP attributes instead of docblock annotations; the annotations keep workingHttpAssert::fetch()accepts atimeout(30 seconds by default), so an unresponsive server can't stall a test- JUnit reports now include test durations, for failed and skipped tests as well
- Faster cold start –
TestCasemethods are discovered in parallel with other tests, and each test file's annotations are parsed only once
💥 Breaking Changes
- PHP 8.1 is now the minimum required version
Environment::skip(),Environment::exit()andTestCase::skip()now returnnever; a subclass overriding them must change its return type too- The
testercommand exits with a non-zero code when it finds no tests, so a mistyped path no longer passes in CI - A
TestCasedata provider that returns no data sets is now an error, just like an empty file-level provider - Assertion type
'integer'inAssert::type()is deprecated, use'int'
🐛 Bug Fixes
- TAP and JUnit outputs no longer contain ANSI color sequences
Environment::lock()reports an error when the lock directory does not exist
Released version 2.6.3
✨ New Features
- Runner now warns you when Xdebug is active and slows the whole run down many times over, so a forgotten
xdebug.modeno longer quietly costs you minutes (no warning when Xdebug serves as the code coverage engine)
🐛 Bug Fixes
- FileMock is ready for PHP 8.6
- Call arguments in stack traces stay on a single line even when strings contain newlines or tabs
Released version 2.6.2
✨ New Features
- TestCase::run() runs every test method even after one fails, so a single run shows you all failures at once: results first, details of each failure after them (#469)
- Stack traces show call arguments, so you see right away which call failed:
redirect('https://…', 302)instead of a bareredirect() - PHP 8.6 support
🐛 Bug Fixes
@phpVersionhandles the boundary versions correctly:@phpVersion 8.4.3runs on PHP 8.4.3 and< 8.0no longer runs on 8.0; common forms like@phpVersion 8.1behave as before- Assert::exception() and Assert::error() check the message also when it is
''or'0'; to skip the message check, passnull - JUnit report counts failed tests in the
failuresattribute instead oferrors; update your CI if it reads onlyerrors - With
--stop-on-failand parallel jobs, running tests are finished before the runner exits, and Ctrl+C terminates them - Environment::lock() on Windows leaves the test its full time limit after waiting for the lock
- HttpAssert with
follow: truetakes headers from the final response only - Code coverage: fixes in the HTML report and Clover metrics, the summary line no longer mixes into TAP or JUnit output on stdout, and
testerexits with code 1 when the requested report cannot be generated
🛡️ Robustness
- Fixes in edge cases of Assert::match() masks (UTF-8,
%f%), FileMock (append,rb+,touch()), DomQuery selectors on PHP < 8.4, Dumper with references and the JUnit report with invalid UTF-8 in the output @multiplewith an invalid value and Helpers::purge() on a path resolving to the root directory are reported as errors
Released version 2.6.1
- PhpInterpreter now passes the command to
proc_open()as an array, so PHP handles argument escaping itself and the subshell is bypassed on Linux too – fewer surprises with paths and arguments containing spaces or special characters - Test::getResult() throws a
LogicExceptioninstead of silently returning an unset value when the test hasn't finished running yet – mistakes surface immediately rather than turning into puzzling downstream errors - Improved PHPDoc types and descriptions throughout the framework for better IDE hints and static analysis
Released version 2.6.0
This release brings true parallel test execution on Windows, smarter PHP configuration handling, and a bunch of quality-of-life improvements. The headline: Tester now respects your system php.ini by default, which is a breaking change but makes the "it works on my machine" debugging sessions a lot shorter.
Breaking Changes
- Tester now uses system
php.iniby default (#465)
Improvements
- Parallel execution on Windows finally works properly – PHP 8.5's
stream_select()fix means Windows users can now enjoy actual parallelism, not just the illusion of it. - Fixed output loss on fast-exiting processes – A race condition could swallow test output when processes finished too quickly. Your test results now survive speed.
New Features
test()andtestException()lifecycle improvements – Both functions now properly callsetUp()andtearDown(), andtearDown()runs even when tests fail. Your cleanup code will actually clean up.- Added global function
testNoError()
Released version 2.5.7
Released version 2.5.6
- support for PHP 8.5
- added HttpAssert
- added Assert::notMatch()
Released version 2.5.5
Dumper::toPhp()prints enum case directly (#457)- DomQuery: uses PHP 8.4 HTML DOM
- added
DomQuery::closest() - DomQuery:: fixed UTF-8 handling
- DomQuery:: supports :scope
- optimized global function calls
Released version v2.5.4
- supports PHP 8.4
- TestHandler: improve cache file uniqueness (#454)
- DataProvider: parses INI files using INI_SCANNER_TYPED mode (BC break)