You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#6546: Both property hooks can now be configured on test doubles of virtual hooked properties, even when the doubled property only declares one of them
--record-test-run-history and --do-not-record-test-run-history CLI options as well as the recordTestRunHistory attribute for the XML configuration file to control whether the status and duration of each test are recorded for use by --order-by defects and --order-by duration-*
--without-class-view CLI option and classView attribute for the XML configuration file to disable the class-oriented view in the HTML code coverage report
--without-file-view CLI option and fileView attribute for the XML configuration file to disable the file-oriented view in the HTML code coverage report
{PWD} is now substituted with the directory of the PHPT test file in --ENV-- and --INI-- sections of PHPT test files
{TMP} (system directory for temporary files) and {ENV:name} (value of environment variable name) are now substituted in --INI-- sections of PHPT test files
A PHPT test whose --INI-- section references an environment variable that is not set is now skipped
A --SKIPIF-- section of a PHPT test file that prints xfail <reason> now marks the test as expected to fail, as if the PHPT test file had an --XFAIL-- section with that reason
The test runner no longer crashes when an attribute cannot be instantiated
Improved TestDox HTML report
The feature formerly named "test result cache" is now named "test run history"; when a cache directory is configured, the file it is stored in is now named test-run-history instead of test-results
The test runner warns now when ordering by defects or duration is configured but recording of the test run history is disabled
TestCase no longer captures error_log() output for tests that do not use expectErrorLog(), avoiding the cost of setting up error log redirection for every test
error_log() output from tests without an expectation is no longer echoed (date-stripped) to PHPUnit's output; it goes to the configured error log again, as it did before capture was introduced
A test running in process isolation that calls error_log() without expectErrorLog() now produces stderr output in the child process, which the test runner reports as a test error
A PHPT test that is expected to fail (--XFAIL-- section or xfail output from the --SKIPIF-- section) but passes is now considered risky; this usually means the expected-failure marker is stale and should be removed
A PHPT test whose --SKIPIF-- section produces output that is not recognized is now considered risky; this usually means the skip check itself is broken. The keywords understood by PHP's own test runner that have no PHPUnit counterpart (info, warn, xleak, flaky, and nocache) are tolerated and do not make the test risky
PHPT tests now run with additional INI defaults for deterministic output (date.timezone=UTC, display_startup_errors=1, fatal_error_backtraces=Off, ignore_repeated_errors=0, precision=14, serialize_precision=-1), consistent with PHP's own test runner; all of them can be overridden per test using the --INI-- section
Deprecated
--cache-result CLI option, use --record-test-run-history instead
--do-not-cache-result CLI option, use --do-not-record-test-run-history instead
cacheResult XML configuration attribute, use recordTestRunHistory instead
PHPUnit\TextUI\Configuration\Configuration::cacheResult(), use PHPUnit\TextUI\Configuration\Configuration::recordTestRunHistory() instead
PHPUnit\TextUI\Configuration\Configuration::testResultCacheFile(), use PHPUnit\TextUI\Configuration\Configuration::testRunHistoryFile() instead
Fixed
Doubling a class with a property that declares both a final and a non-final hook no longer triggers a fatal error
expectErrorLog() now only considers error_log() output written after it was called; previously, the expectation was also satisfied by output written before expectErrorLog() was called
PHPT test files with an unknown section, a duplicated section, more than one of the --FILE--, --FILEEOF--, and --FILE_EXTERNAL-- sections, or more than one expectation section (--EXPECT--, --EXPECTF--, --EXPECTREGEX--, and their _EXTERNAL variants) are now rejected; previously, misspelled sections were silently ignored and duplicated sections silently overwrote each other
The regular expression from an --EXPECTREGEX-- section must now match the PHPT test's entire output, and . now matches newline characters, consistent with PHP's own test runner; previously, a match on a substring of the output was sufficient for the test to pass
The reason printed by a --SKIPIF-- section of a PHPT test is no longer mangled when it follows the skip <reason> convention used by PHP's own test suite; previously, the first two characters of the reason were stripped unless the skip: <reason> or skip - <reason> convention was used
The test runner no longer aborts with an uncaught PHPUnit\Runner\Phpt\InvalidPhptFileException when a PHPT test file has an empty --FILE-- or --FILEEOF-- section or a --FILE_EXTERNAL-- section that references an empty file; such a file is now rejected while it is parsed and reported as an errored test
PHPUnit\Runner\Phpt\InvalidPhptFileException now has a message that explains why the PHPT test file was rejected
Learn how to install or update PHPUnit 13.3 in the documentation.
Messages for tests that are skipped because of an unsatisfied RequiresPhp, RequiresPhpunit, or RequiresPhpExtension version requirement now include the version that is actually being used
Warning messages about incomplete version requirements as well as version requirements without a version comparison operator, and the error message for invalid version requirements, now include the full version requirement and explain what is expected
Fixed
#6825: Forwarding to previous error handler can result in infinite recursion
#6831: PHPUnit's error handler does not respect @ error suppression and forwards suppressed warnings to previous error handler
#6833: assertArrayHasKey() does not accept ArrayAccess implementations with a specific value type when test code is analysed with PHPStan at level 9
#6854: Deprecation triggered in first-party code is wrongly classified as indirect when the first-party code is called from third-party code
Test classes were not sorted relative to each other when tests were ordered by duration
Learn how to install or update PHPUnit 13.2 in the documentation.
#6681: Comment-aware variants of XML comparison assertions
The executionOrder attribute in the XML configuration file now accepts defects combined with any main order, as well as three-way combinations of depends/no-depends, defects, and a main order (for example, depends,defects,duration-ascending)
--validate-configuration CLI option to validate an XML configuration file for PHPUnit
Report TestDox information in Open Test Reporting XML
Report per-test and per-test-suite resource usage (time, memory usage, peak memory usage) in Open Test Reporting XML
Report number of assertions performed for each test in Open Test Reporting XML
Report structured comparison failure details (expected, actual, diff) in Open Test Reporting XML
Report random order seed in Open Test Reporting XML when test execution order is randomised
#6535: Use sebastian/file-filter in SourceFilter::includes() for issue trigger identification
#6581: Allow #[IgnoreDeprecations] to be repeated
#6609: Skip data providers whose method cannot match --filter
#6685: Generate failure messages for inverse assertions by authoring negations, not by rewriting strings
Only errors and failures are now considered for "defect first" test reordering (tests that triggered deprecations, notices, or warnings as well as incomplete, risky, and skipped tests were previous also considered)
A warning is now emitted when closures are compared for equality using the IsEqual, IsEqualCanonicalizing, IsEqualIgnoringCase, IsEqualWithDelta, and TraversableContainsEqual constraints or the assertEquals(), assertEqualsCanonicalizing(), assertEqualsIgnoringCase(), assertEqualsWithDelta(), and assertContainsEquals() assertions
Deprecated
#6075: --order-by duration CLI option, use --order-by duration-ascending instead
#6075: --order-by size CLI option, use --order-by size-ascending instead
#6075: executionOrder="duration" XML configuration attribute value, use executionOrder="duration-ascending" instead
#6075: executionOrder="size" XML configuration attribute value, use executionOrder="size-ascending" instead
#6560: Soft-deprecate expectExceptionMessage(), use expectExceptionMessageIsOrContains() instead
Fixed
#5845: Error handlers registered before PHPUnit (e.g. via auto_prepend_file) cause false "risky test" warnings
#5851: Output buffer manipulation in tests causes incorrect capture, hangs, and silent failures
#6582: TestSuiteSorter::cmpSize() does not handle TestSuite objects for TestCase classes
Learn how to install or update PHPUnit 13.2 in the documentation.
#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 testStarted and testFinished
#6601: Anonymous classes are not rejected with a clear error when creating a test double
#6603: assertArrays*IgnoringOrder() fails on mixed scalar types and on reordered nested associative arrays
MockBuilder::setMockClassName() and TestStubBuilder::setStubClassName() now reject values that are not valid unqualified PHP class identifiers, throwing the new InvalidClassNameException
The regular expression used by Generator::ensureValidMethods() to validate method names passed to MockBuilder::onlyMethods() and addMethods() 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 13.1 in the documentation.
Support for configuring HTML code coverage report options (colors, thresholds, custom CSS) in XML configuration file without requiring an outputDirectory attribute, allowing the output directory to be specified later with the --coverage-html CLI option
Support for configuring dark mode colors, progress bar colors, and breadcrumb colors for HTML code coverage reports in the XML configuration file
Changed
#6557: Improve failure description for StringMatchesFormatDescription constraint which is used by assertFileMatchesFormat(), assertFileMatchesFormatFile(), assertStringMatchesFormat(), assertStringMatchesFormatFile(), and EXPECTF sections of PHPT test files
The HTML code coverage report now uses a more colorblind-friendly blue/amber/orange palette by default
Extracted PHPUnit\Runner\Extension\Facade from a concrete class to an interface and introduced an internal ExtensionFacade implementation, so that extensions only depend on the Facade interface while PHPUnit internally uses the ExtensionFacade class that also provides query methods
Deprecated
#6515: Deprecate the --log-events-verbose-text <file> CLI option
#6537: Soft-deprecate id() and after() for mock object expectations
#4440: Improve error when configured code coverage file list is empty
#6549: Allow to stub both hooks of non-virtual properties
Fixed
#6529: Git "detached HEAD state" in Open Test Reporting (OTR) XML logger not handled properly
#6545: Stubbing a class with set property hook leaves property uninitialized by default
The RegularExpression and StringMatchesFormatDescription did not handle preg_match() errors such as Compilation failed: regular expression is too large
Learn how to install or update PHPUnit 13.0 in the documentation.
#6450: TestCase::invokeTestMethod() method for customizing test method invocation
#6455: withParameterSetsInOrder() and withParameterSetsInAnyOrder() for expecting calls to the same method of a mock object but with different arguments
--test-files-file <file> CLI option to configure a file that contains the paths to the test files to be loaded (one file per line); use this when using CLI arguments is not an option due to argument length limitations
Tick the box to add this pull request to the merge queue (same as @mergifyio queue).
Queue this pull request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
~6.0 || ~7.0 || ~9.0→~13.0Release Notes
sebastianbergmann/phpunit (phpunit/phpunit)
v13.3.0: PHPUnit 13.3.0Compare Source
Added
--repeatCLI option and#[Repeat]attributeexpectOutputString()andexpectOutputRegex()to be combined and repeated#[CoversNothing]on methods--retryCLI option#[Retry]attributefailOnAllIssues="true"is combined with an explicitly disabled fine-grainedfailOn*setting--record-test-run-historyand--do-not-record-test-run-historyCLI options as well as therecordTestRunHistoryattribute for the XML configuration file to control whether the status and duration of each test are recorded for use by--order-by defectsand--order-by duration-*--without-class-viewCLI option andclassViewattribute for the XML configuration file to disable the class-oriented view in the HTML code coverage report--without-file-viewCLI option andfileViewattribute for the XML configuration file to disable the file-oriented view in the HTML code coverage report{PWD}is now substituted with the directory of the PHPT test file in--ENV--and--INI--sections of PHPT test files{TMP}(system directory for temporary files) and{ENV:name}(value of environment variablename) are now substituted in--INI--sections of PHPT test files--INI--section references an environment variable that is not set is now skipped--SKIPIF--section of a PHPT test file that printsxfail <reason>now marks the test as expected to fail, as if the PHPT test file had an--XFAIL--section with that reasonChanged
test-run-historyinstead oftest-resultsTestCaseno longer captureserror_log()output for tests that do not useexpectErrorLog(), avoiding the cost of setting up error log redirection for every testerror_log()output from tests without an expectation is no longer echoed (date-stripped) to PHPUnit's output; it goes to the configured error log again, as it did before capture was introducederror_log()withoutexpectErrorLog()now produces stderr output in the child process, which the test runner reports as a test error--XFAIL--section orxfailoutput from the--SKIPIF--section) but passes is now considered risky; this usually means the expected-failure marker is stale and should be removed--SKIPIF--section produces output that is not recognized is now considered risky; this usually means the skip check itself is broken. The keywords understood by PHP's own test runner that have no PHPUnit counterpart (info,warn,xleak,flaky, andnocache) are tolerated and do not make the test riskydate.timezone=UTC,display_startup_errors=1,fatal_error_backtraces=Off,ignore_repeated_errors=0,precision=14,serialize_precision=-1), consistent with PHP's own test runner; all of them can be overridden per test using the--INI--sectionDeprecated
--cache-resultCLI option, use--record-test-run-historyinstead--do-not-cache-resultCLI option, use--do-not-record-test-run-historyinsteadcacheResultXML configuration attribute, userecordTestRunHistoryinsteadPHPUnit\TextUI\Configuration\Configuration::cacheResult(), usePHPUnit\TextUI\Configuration\Configuration::recordTestRunHistory()insteadPHPUnit\TextUI\Configuration\Configuration::testResultCacheFile(), usePHPUnit\TextUI\Configuration\Configuration::testRunHistoryFile()insteadFixed
expectErrorLog()now only considerserror_log()output written after it was called; previously, the expectation was also satisfied by output written beforeexpectErrorLog()was called--FILE--,--FILEEOF--, and--FILE_EXTERNAL--sections, or more than one expectation section (--EXPECT--,--EXPECTF--,--EXPECTREGEX--, and their_EXTERNALvariants) are now rejected; previously, misspelled sections were silently ignored and duplicated sections silently overwrote each other--EXPECTREGEX--section must now match the PHPT test's entire output, and.now matches newline characters, consistent with PHP's own test runner; previously, a match on a substring of the output was sufficient for the test to pass--SKIPIF--section of a PHPT test is no longer mangled when it follows theskip <reason>convention used by PHP's own test suite; previously, the first two characters of the reason were stripped unless theskip: <reason>orskip - <reason>convention was usedPHPUnit\Runner\Phpt\InvalidPhptFileExceptionwhen a PHPT test file has an empty--FILE--or--FILEEOF--section or a--FILE_EXTERNAL--section that references an empty file; such a file is now rejected while it is parsed and reported as an errored testPHPUnit\Runner\Phpt\InvalidPhptFileExceptionnow has a message that explains why the PHPT test file was rejectedLearn how to install or update PHPUnit 13.3 in the documentation.
Keep up to date with PHPUnit:
v13.2.6: PHPUnit 13.2.6Compare Source
Fixed
Learn how to install or update PHPUnit 13.2 in the documentation.
Keep up to date with PHPUnit:
v13.2.5: PHPUnit 13.2.5Compare Source
Changed
RequiresPhp,RequiresPhpunit, orRequiresPhpExtensionversion requirement now include the version that is actually being usedFixed
@error suppression and forwards suppressed warnings to previous error handlerassertArrayHasKey()does not acceptArrayAccessimplementations with a specific value type when test code is analysed with PHPStan at level 9Learn how to install or update PHPUnit 13.2 in the documentation.
Keep up to date with PHPUnit:
v13.2.4: PHPUnit 13.2.4Compare Source
Fixed
error_reporting()output dynamicallyLearn how to install or update PHPUnit 13.2 in the documentation.
Keep up to date with PHPUnit:
v13.2.3Compare Source
v13.2.2: PHPUnit 13.2.2Compare Source
Fixed
Learn how to install or update PHPUnit 13.2 in the documentation.
Keep up to date with PHPUnit:
v13.2.1: PHPUnit 13.2.1Compare Source
Fixed
--filtermatches the name of a data set but not the name of the test methodLearn how to install or update PHPUnit 13.2 in the documentation.
Keep up to date with PHPUnit:
v13.2.0: PHPUnit 13.2.0Compare Source
Added
IsTrue,IsFalse,IsNull,IsFinite,IsInfinite, andIsNanconstraints#[RunTestsInSeparateProcesses]from parent test classesassertContainsEquals()should usesebastian/comparatorfor element comparison--SKIPIF--does not have standard-output side effect$_dataNameavailable to#[TestDoxFormatter]callbacks$skipWhenEmptyparameter for#[DataProvider]and#[DataProviderExternal]--stop-on-defect,--stop-on-error, etc. to accept an optional thresholdwillReturnMap()with constraint support and strict matching--list-test-idsCLI option and enhance--filterCLI option to support test ID syntax--run-test-id <test-id>CLI option that accepts a single test ID for exact matching--compactCLI option andPHPUNIT_COMPACT_OUTPUT=1environment variable)--disable-coverage-targetingCLI optionexecutionOrderattribute in the XML configuration file now acceptsdefectscombined with any main order, as well as three-way combinations ofdepends/no-depends,defects, and a main order (for example,depends,defects,duration-ascending)--validate-configurationCLI option to validate an XML configuration file for PHPUnitChanged
sebastian/file-filterinSourceFilter::includes()for issue trigger identification#[IgnoreDeprecations]to be repeated--filterIsEqual,IsEqualCanonicalizing,IsEqualIgnoringCase,IsEqualWithDelta, andTraversableContainsEqualconstraints or theassertEquals(),assertEqualsCanonicalizing(),assertEqualsIgnoringCase(),assertEqualsWithDelta(), andassertContainsEquals()assertionsDeprecated
--order-by durationCLI option, use--order-by duration-ascendinginstead--order-by sizeCLI option, use--order-by size-ascendinginsteadexecutionOrder="duration"XML configuration attribute value, useexecutionOrder="duration-ascending"insteadexecutionOrder="size"XML configuration attribute value, useexecutionOrder="size-ascending"insteadexpectExceptionMessage(), useexpectExceptionMessageIsOrContains()insteadFixed
auto_prepend_file) cause false "risky test" warningsTestSuiteSorter::cmpSize()does not handleTestSuiteobjects forTestCaseclassesLearn how to install or update PHPUnit 13.2 in the documentation.
Keep up to date with PHPUnit:
v13.1.14: PHPUnit 13.1.14Compare Source
Fixed
assertNotEquals()failure message says "is equal to" instead of "is not equal to" when comparing arrays or objectsexpectOutputString()andexpectOutputRegex()silently replace themselves and each otherLearn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.13: PHPUnit 13.1.13Compare Source
Fixed
assertXmlStringEqualsXmlString()regressed into treating comments as significantLearn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.12: PHPUnit 13.1.12Compare Source
Fixed
-dsettings forwarded to child processes (breaks PCOV coverage)Learn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.11: PHPUnit 13.1.11Compare Source
Fixed
=need to be quoted before forwarding via-dLearn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.10: PHPUnit 13.1.10Compare Source
Changed
Learn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.9: PHPUnit 13.1.9Compare Source
Changed
TestorTestsprefix is no longer stripped from class names when they are processed for TestDox outputFixed
Learn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.8: PHPUnit 13.1.8Compare Source
Fixed
testStartedandtestFinishedassertArrays*IgnoringOrder()fails on mixed scalar types and on reordered nested associative arraysMockBuilder::setMockClassName()andTestStubBuilder::setStubClassName()now reject values that are not valid unqualified PHP class identifiers, throwing the newInvalidClassNameExceptionGenerator::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 acceptedLearn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.7: PHPUnit 13.1.7Compare Source
Changed
LIBXML_NONETwhen parsing/validating XML configuration files to make explicit that no network I/O is performedLearn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.6: PHPUnit 13.1.6Compare Source
Fixed
;and"are not preserved when forwarding settings to child processesLearn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.5: PHPUnit 13.1.5Compare Source
Fixed
-dsettings are not forwarded to child processes for process isolationRequiresPhp(e.g.<=8.5) is compared against full PHP version, causing unexpected skipsdataSetAsStringWithData()raises "float is not representable as int" warning for large floats in data setsLearn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.4: PHPUnit 13.1.4Compare Source
Fixed
DefaultJobRunnerdeadlocks on child processes that write large amounts of stderr output$_SERVERentries leak from parent into child processfailOnEmptyTestSuite="false"inphpunit.xmlis ignored when--group/--filter/--testsuitematches no testsLearn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.3: PHPUnit 13.1.3Compare Source
Fixed
Learn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.2: PHPUnit 13.1.2Compare Source
Fixed
--random-order-seedis used when test execution order is not random--filterdoes not work when filter string starts with#TestSuiteSkippedevent--filter,--group,--testsuite) yields no teststearDown()and handler restoration, causing subsequent tests to be marked as riskyLearn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.1: PHPUnit 13.1.1Compare Source
Changed
exitwas called from some testFixed
colors="true"in XML configuration file does not unconditionally enable colored output--migrate-configurationdoes not update schema location when XML content already validates against current schemawillReturnCallback()is silently swallowed when code under test catches exceptionsset_include_path()TestDoubleBuildermethod chainingLearn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.0: PHPUnit 13.1.0Compare Source
Added
includeInCodeCoverageattribute for<directory>and<file>children of<source>#[Group]information in Open Test Reporting (OTR) XML logfile#[DataProviderClosure]for static closures<issueTriggerResolvers>in the XML configuration file%r...%rinEXPECTFsectionoutputDirectoryattribute, allowing the output directory to be specified later with the--coverage-htmlCLI optionChanged
StringMatchesFormatDescriptionconstraint which is used byassertFileMatchesFormat(),assertFileMatchesFormatFile(),assertStringMatchesFormat(),assertStringMatchesFormatFile(), andEXPECTFsections of PHPT test filesPHPUnit\Runner\Extension\Facadefrom a concrete class to an interface and introduced an internalExtensionFacadeimplementation, so that extensions only depend on theFacadeinterface while PHPUnit internally uses theExtensionFacadeclass that also provides query methodsDeprecated
--log-events-verbose-text <file>CLI optionid()andafter()for mock object expectationsFixed
FILE_EXTERNALbreaks__DIR__TestSuiteLoaderis brittle and causes "Class FooTest not found" even for valid tests in valid filenamesLearn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.0.6: PHPUnit 13.0.6Compare Source
Changed
Fixed
RegularExpressionandStringMatchesFormatDescriptiondid not handlepreg_match()errors such asCompilation failed: regular expression is too largeLearn how to install or update PHPUnit 13.0 in the documentation.
Keep up to date with PHPUnit:
v13.0.5: PHPUnit 13.0.5Compare Source
Fixed
Learn how to install or update PHPUnit 13.0 in the documentation.
Keep up to date with PHPUnit:
v13.0.4: PHPUnit 13.0.4Compare Source
Fixed
Learn how to install or update PHPUnit 13.0 in the documentation.
Keep up to date with PHPUnit:
v13.0.3: PHPUnit 13.0.3Compare Source
Fixed
<ini />can silently failLearn how to install or update PHPUnit 13.0 in the documentation.
Keep up to date with PHPUnit:
v13.0.2: PHPUnit 13.0.2Compare Source
Deprecated
atLeast()with an argument that is not positivewith*()withoutexpects()Fixed
SourceMappermay be deleted prematurely when multiple PHPUnit processes run in parallelwith()is used withoutexpects()Learn how to install or update PHPUnit 13.0 in the documentation.
Keep up to date with PHPUnit:
v13.0.1: PHPUnit 13.0.1Compare Source
Fixed
method()returnsInvocationMockerinstead ofInvocationStubberfor test stubsLearn how to install or update PHPUnit 13.0 in the documentation.
Keep up to date with PHPUnit:
v13.0.0: PHPUnit 13.0.0Compare Source
Added
TestCase::invokeTestMethod()method for customizing test method invocationwithParameterSetsInOrder()andwithParameterSetsInAnyOrder()for expecting calls to the same method of a mock object but with different argumentsassertArraysAreIdentical(),assertArraysAreIdenticalIgnoringOrder(),assertArraysHaveIdenticalValues(),assertArraysHaveIdenticalValuesIgnoringOrder(),assertArraysAreEqual(),assertArraysAreEqualIgnoringOrder(),assertArraysHaveEqualValues(), andassertArraysHaveEqualValuesIgnoringOrder()assertions--test-files-file <file>CLI option to configure a file that contains the paths to the test files to be loaded (one file per line); use this when using CLI arguments is not an option due to argument length limitationsDeprecated
any()matcher (hard deprecation)Removed
Assert::isType()assertContainsOnly()andassertNotContainsOnly()containsOnly()testClassName()method on event value objects for hook methods called for test methodsConfiguration::includeTestSuite()andConfiguration::excludeTestSuite()--dont-report-useless-testsCLI option#[CoversNothing]on a test method#[RunClassInSeparateProcess]attributeLearn how to install or update PHPUnit 13.0 in the documentation.
Keep up to date with PHPUnit:
v12.5.33: PHPUnit 12.5.33Compare Source
Fixed
Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.32: PHPUnit 12.5.32Compare Source
Fixed
assertArrayHasKey()does not acceptArrayAccessimplementations with a specific value type when test code is analysed with PHPStan at level 9Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.31Compare Source
v12.5.30: PHPUnit 12.5.30Compare Source
Fixed
Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.29: PHPUnit 12.5.29Compare Source
Fixed
assertNotEquals()failure message says "is equal to" instead of "is not equal to" when comparing arrays or objectsexpectOutputString()andexpectOutputRegex()silently replace themselves and each otherLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.
This change is