Added
- #6585:
executionOrderattribute values and--order-bytoken lists that spell the order beforedefects, for exampleduration-ascending,defects - #6585:
pipeline()on theTestSuite\Sortedevent for inspecting which reordering stages were applied - #6686:
Constraint::negatedToString()andConstraint::negatedFailureDescription()for authoring the description of a constraint that is wrapped inLogicalNot - #6863: Cache which tests a test file contains
- #6957: Allow ordering tests by the time their source files were last modified
- #6958: Select the tests that are in all of several groups
- #6960: Record the order in which methods of mock objects are invoked
- #6964:
#[RequiresClass]attribute to skip a test if a class does not exist - #6995:
ChildProcessExtensioninterface for extensions that need to be bootstrapped in the child process of a test that runs in process isolation --coverage-jsonlCLI option and<jsonl>element for the XML configuration file to write a code coverage report in JSONL format, one JSON object per line, that reports uncovered code rather than every executable line--timeoutCLI option to limit the wall-clock time of the entire test runrequireCoverageMetadataOnSmallTests,requireCoverageMetadataOnMediumTests, andrequireCoverageMetadataOnLargeTestsattributes for the XML configuration file to require code coverage metadata depending on the size of a test; these have precedence overrequireCoverageMetadata
Changed
- Output printed by a test is now shown in the compact output as a
--- OUTPUT:record that is attributed to the test instead of being passed through unformatted; the record is omitted whenbeStrictAboutOutputDuringTestsor--disallow-test-outputalready reports the output as risky
Deprecated
- #6585: Writing
defectsbefore the order for--order-byandexecutionOrder, which will change meaning in PHPUnit 14 - #6585:
dependsandno-dependsfor--order-byandexecutionOrder - #6585: Configuring more than one order for
--order-byandexecutionOrder - #6585: Unknown values for the
executionOrderXML configuration attribute, which are currently ignored - #6686:
Constraint::failureDescriptionInContext()andLogicalNot::negate() - #6999: Class-level
#[Group],#[Ticket],#[Small],#[Medium], and#[Large]on parent classes of test classes
Fixed
- Issues that are listed in the baseline are not ignored for tests that are run in a separate process
- A test that is run in process isolation aborts the test run when its result cannot be unserialized, for instance because it returns an object that holds a test double
- A test that uses
#[DataProviderClosure]errors when it is run in process isolation
Learn how to install or update PHPUnit 13.4 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.