Added
- #6596: Backport
TestCase::invokeTestMethod()method for customizing test method invocation from PHPUnit 13
Fixed
- #6595: Crash when before-class or after-class method fails with assertion failure
- #6599: TeamCity logger does not wrap failures in before-test methods with
testStartedandtestFinished - #6601: Anonymous classes are not rejected with a clear error when creating a test double
MockBuilder::setMockClassName()andTestStubBuilder::setStubClassName()now reject values that are not valid unqualified PHP class identifiers, throwing the newInvalidClassNameException- The regular expression used by
Generator::ensureValidMethods()to validate method names passed toMockBuilder::onlyMethods()andaddMethods()was not anchored, so any string containing a valid identifier substring (including strings with parentheses, braces, comments, or newlines) was accepted
Learn how to install or update PHPUnit 12.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.