Rule
Rasuvaeff\PropertyTesting\StateMachine\Rule
Class — Package: property-testing-core — Source — Version: v1.0.0-1-g88fdee2
Marks a public method of a rule-based machine as one step the generated sequence may take. Its parameters are drawn the way a property's are — from an override, the docblock, then the native type (Gen::forParameters()); overrides come from a public static function <rule>Generators(): array on the machine, or from the method $generators names.
The body is the step: it drives the system under test, updates the model the machine keeps as its own state, and asserts — an exception is the failed postcondition. See Gen::rules().
Constructor
php
__construct(
?string $generators = NULL,
)| Parameter | Type | Default | Description |
|---|---|---|---|
$generators | ?string | NULL | A public static method of the machine returning generators by parameter name, for the parameters a type cannot describe; null looks for <rule>Generators() and derives the rest from the signature either way. |