PropertyDefinition
Rasuvaeff\PropertyTesting\Runner\PropertyDefinition
Class — Package: property-testing-core — Source — Version: 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,
)| Parameter | Type | Default | Description |
|---|---|---|---|
$id | string | required | Stable identity of the property (Class::method under Testo) — keys the events and the regression corpus. |
$name | string | required | Display name used in failure messages (the bare method name under Testo). |
$generators | array<string,\ArbitraryInterface> | required | One generator per parameter, keyed by name. |
$parameterNames | list<string> | required | The property body's parameters, in declaration order. |
$config | Runner\PropertyConfig | `\Rasuvaeff\PropertyTesting\Runner\PropertyConfig::__set_state(array( | |
| 'runs' => 100, | |||
| 'seed' => NULL, | |||
| 'maxShrinks' => NULL, | |||
| 'maxDiscards' => NULL, | |||
| 'timeoutMs' => NULL, | |||
| 'budgetMs' => NULL, | |||
| ))` | |||
$examples | list<list> | [] | Fixed positional argument tuples run before the random phase. |
$replayRegressions | bool | true | Whether 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. |