Skip to content

PropertyDefinition

Rasuvaeff\PropertyTesting\Runner\PropertyDefinition

ClassPackage: property-testing-coreSourceVersion: v0.1.0-12-g86ead85

One property, fully resolved for the engine: no attribute, no reflection, no environment. An adapter builds it from its own conventions (Testo's #[Property] + <method>Generators(), a PHPUnit fluent call, a bare CLI script) and hands it to PropertyRunner.

Constructor

php
__construct(
    string $id,
    string $name,
    array<string,\ArbitraryInterface> $generators,
    list<string> $parameterNames,
    Runner\PropertyConfig $config = \Rasuvaeff\PropertyTesting\Runner\PropertyConfig::__set_state(array(
   'runs' => 100,
   'seed' => NULL,
   'maxShrinks' => NULL,
   'maxDiscards' => NULL,
   'timeoutMs' => NULL,
   'budgetMs' => NULL,
)),
    list<list> $examples = [],
    bool $replayRegressions = true,
)
ParameterTypeDefaultDescription
$idstringrequiredStable identity of the property (Class::method under Testo) — keys the events and the regression corpus.
$namestringrequiredDisplay name used in failure messages (the bare method name under Testo).
$generatorsarray<string,\ArbitraryInterface>requiredOne generator per parameter, keyed by name.
$parameterNameslist<string>requiredThe property body's parameters, in declaration order.
$configRunner\PropertyConfig`\Rasuvaeff\PropertyTesting\Runner\PropertyConfig::__set_state(array(
'runs' => 100,
'seed' => NULL,
'maxShrinks' => NULL,
'maxDiscards' => NULL,
'timeoutMs' => NULL,
'budgetMs' => NULL,
))`
$exampleslist<list>[]Fixed positional argument tuples run before the random phase.
$replayRegressionsbooltrueWhether recorded corpus entries replay before the random phase. An adapter turns this off when the property pins its own seed, so the pinned reproducibility wins over the corpus.