Repository navigation
Releases: rasuvaeff/property-testing-phpunit
Releases · rasuvaeff/property-testing-phpunit
Release list
v1.1.0
- Added: generators written on the closure's parameters with core's
#[Generate](#61). Withoutauto(), theforAll()map and the
attributes together have to cover every parameter — the map may be empty;
underauto()the attributes sit between the map and the@paramtype.
Requiresrasuvaeff/property-testing-core^1.2. - Changed: without
auto(), a parameter neither the map nor#[Generate]
covers is refused naming the function and the parameter, instead of the
engine'sNo generator for parameter "x". - Docs: the READMEs and
llms.txtnow state what follows from driving the
engine through a single PHPUnit test method:setUp()/tearDown()and
#[Before]/#[After]run once per property rather than per run, test-double
expectations are verified after the last run (an unmetonce()fails the
property as a whole and is never shrunk), and per-test coverage counts lines
reached only while shrinking. The Testo adapter does not share the first one.
v1.0.0
The stability release, in step with rasuvaeff/property-testing-core 1.0.0.
The adapter's surface is that of 0.10.0, unchanged: the PropertyTesting
trait, the forAll() chain with its knobs, PropertyCheck, the listeners
and the environment table. A project on ^0.10 upgrades by widening the
constraint to ^1.0.
- Requires
rasuvaeff/property-testing-core^1.0(compatibility policy
§8: a caret on the engine's current major). - Docs: the footnotes that dated a behaviour to a core 0.x release
(since core 0.9,core 0.9 reads only …) are gone from the READMEs,
llms.txtandAGENTS.md;llms.txtnames the current requirement.
v0.10.0
- Added: the core 0.12 knobs on the chain —
exhaustive()/
exhaustiveBudget()(walk the parameter domain instead of sampling it),
flakyReplays()(re-execute the minimised counterexample; a passing replay
is reported as flaky) andsearchRuns()(targeted search after the random
phase for a body that callsTarget::maximize()/minimize()); each
validates at the call, naming the property, like the other setters. - Added:
PROPERTY_EXHAUSTIVE(a flag) andPROPERTY_SEARCH_RUNS(a
non-negative integer,0switches the search off) dial the suite, the way
PROPERTY_DERANDOMIZEandPROPERTY_RUNSdo. - Added: every
Classify::tabulate()table with its pairwise
intersections, the exhaustive outcome (walked, on stdout; declined and why,
on stderr) and the search report are printed beside the distribution line;
PROPERTY_VERBOSElogs everyTargetImprovedevent. - Requires
rasuvaeff/property-testing-core^0.12.
v0.9.2
- Fixed. A wide
throws()swallowed a failed assertion: PHPUnit's
AssertionFailedErrorextends\RuntimeException, so
->throws(\RuntimeException::class)— or\Exception,\Throwable—
matched a failingassertSame()in the body and the property passed on a
falsified body, the T-1 of 0.9.0 on the new knob.throws()refuses a
class the assertion failure is an instance of, naming why; the executor
never takes an assertion failure for the expected throw, whatever class
was named (#54).
v0.9.1
- Changed. Accepts
rasuvaeff/property-testing-core^0.11alongside^0.9/^0.10. Nothing in 0.11.0 reaches this package: the release is additive (thePropertyTestingExceptionmarker,AssumptionSkippedpromoted to@api,Gen::stringOf()defaults, docblock reading inGen::forClass()), and the suite is green against it unchanged.
v0.9.0
check()validates theforAll()map before the engine runs, and both
checks are behaviour changes for a suite that relied on the silence: a
value that is not anArbitraryInterfaceis rejected with
Property "<name>": forAll() expects array<string, ArbitraryInterface>, got int for key "x"
instead of failing inside the runner as a method call on a non-object with
neither the key nor the property in the message; and a key that is not a
parameter of the closure is rejected with or withoutauto()— before,
onlyauto()checked it and a typoed entry ran green in whatever domain
the real parameter had (#49). Message shapes follow the Testo adapter's.- Every outcome of a property registers one assertion on the running
TestCase, not only a pass: a falsified property whose body performed no
PHPUnit assertion was reported twice, as Failed and as Risky ("This test
did not perform any assertions"). A property whose every run was skipped
still registers none — that test is skipped, not checked (#50). - The chain validates at the setters, naming the property:
runs(0)throws
Property "<name>": runs must be greater than or equal to 1at the call,
and so domaxShrinks/maxDiscardsbelow0and
timeoutMs/budgetMs/shrinkBudgetMsbelow1. Apath()or
PROPERTY_PATHwithout aseed()orPROPERTY_SEEDis refused by
check()the same way (path()andseed()may come in either order, so
the setter cannot). The engine used to reject the same values with the
same bounds, but without saying which property. - The distribution report, the discard warning and the unstable-id warnings
are written as"\n" . $line . "\n": PHPUnit prints its progress dots on
the same terminal, and a line that started where the cursor was ended up
glued to....F... The line content is unchanged and still byte-identical
to the Testo adapter's; the leading newline is a PHPUnit-only asymmetry
recorded inAGENTS.md. TheVerboseListenertrace is untouched. - Documentation catches up with core 0.10 (README ×2,
llms.txt,
AGENTS.md):PROPERTY_VERBOSE/PROPERTY_DERANDOMIZEare off on0,
false,off,no(case-insensitive, trimmed), not only on''/0;
GenerationExhaustedisGenerationExhaustedException;auto()no
longer claims to require core^0.5.EnvironmentParityTestpins the
off words (skipped under core 0.9, where only''/0are off). psalm.xmllistsTestCase::dataName()next toTestCase::name(); the
comment records that Psalm 6.17 resolves neither call from inside the
trait, so both entries document the boundary rather than silence anything.
v0.8.0
- Added
PropertyCheck::throws(string $exceptionClass): the property-level
replacement forexpectException(), which cannot see a throw from inside a
check()closure. Every trial must throw the class (a subclass matches); a
trial that returns normally fails with "Expected <class> to be thrown, but
it was not" and shrinks like any other counterexample, a foreign class is
that trial's failure. Skips andAssume::that()discards keep their own
meaning. A class string that is not aThrowableis rejected with
InvalidArgumentExceptionat thethrows()call. - Accepts
rasuvaeff/property-testing-core^0.10alongside^0.9. - Documentation catches up with core 0.9 and 0.10, from the family's 1.0
review: a partly skipped property spends a separate budget rather than
counting againstmaxDiscards(README ×2), andmaxDiscards()caps both
budgets when set while leaving them different when unset (fluent-chain table
×2).output()leaves that table — the section below it already calls the
method@internal, and a public table listing it contradicted that inside
one document. AGENTS.mdsays four types rather than three (PhpUnitTrialExecutorhas
shipped since 0.6.0), names that executor rather than core's
CallableTrialExecutoras the one running the closure, and no longer routes
the corpus throughCorpusFromEnv::resolve()— a class this package removed
in 0.6.0.psalm.xmlno longer enablesext-redisandcomposer-require-checker.json
no longer whitelistsPredis\ClientandRedis. Both were left over from
0.6, when this package parsed the DSN itself; neithersrc/file has
mentioned Redis since..gitattributesdropsexport-ignoreentries for
/docs,/benchmarksand/ROADMAP.md, none of which exist here.composer rectoris green again: the unused variable in
EnvironmentParityTest'scatchis gone, asRemoveUnusedVariableInCatchRector
asks. It had been red since that test was written, which iscomposer release-checkred —composer builddoes not run rector.
v0.7.1
- Requires
rasuvaeff/property-testing-core^0.9, where an environmental skip
no longer spends the discard budget and is counted apart from discards. The
excessive-discard warning this adapter prints therefore stops firing on a
machine that was merely missing a dependency, without a change here.^0.8is
not kept alongside: the family moves together, and an adapter accepting both
is what left-namesunable to install beside one.
v0.7.0
- An environmental skip (
markTestSkipped(),markTestIncomplete()) is
reported to the engine asTrialOutcome::skipped()rather than as a plain
discard, so a recorded regression whose replay only skipped is kept instead
of pruned. A machine without the dependency the body guards against used to
delete the counterexample for every machine that has it. Requires
rasuvaeff/property-testing-core^0.8.
v0.6.3
- Allows
rasuvaeff/property-testing-core^0.7. - The discard warning is printed before the distribution line, matching the
Testo adapter; the two emitted the same pair in opposite orders. PropertyCheck::clock()— an internal seam, mirroring the Testo adapter, that
makes thetimeoutMsandbudgetMsbranches testable without real waiting.- The
id()documentation is attached toid()again; it had drifted onto
currentId(), leaving both methods undocumented.