PropertyInterceptor
Rasuvaeff\PropertyTesting\Testo\PropertyInterceptor
Class — Package: property-testing-testo — Source — Version: v0.1.0
Implements: Testo\Pipeline\Middleware\TestRunInterceptor, Testo\Pipeline\Interceptor
The Testo adapter for a Property: resolves the test framework's conventions — the attribute, the reflection-discovered generators/examples methods, the environment overrides — into a PropertyDefinition, runs it on the framework-agnostic PropertyRunner, and maps the structured PropertyResult back to a single Testo TestResult.
The interceptor self-registers via the Property attribute's Testo\Pipeline\Attribute\FallbackInterceptor, so simply requiring the package is enough — no plugin registration in testo.php is needed.
It sits close to the test function in the pipeline (after data providers, repeat and retry policies) so it owns argument generation for property tests.
Constructor
__construct(
Testo\Common\Messenger $messenger,
?Runner\Clock $clock = NULL,
iterable<\PropertyListener> $listeners = [],
)| Parameter | Type | Default | Description |
|---|---|---|---|
$messenger | Testo\Common\Messenger | required | |
$clock | ?Runner\Clock | NULL | |
$listeners | iterable<\PropertyListener> | [] | Observers of the run's lifecycle events, notified in the given order. The verbose trace listener is appended automatically when PROPERTY_VERBOSE is on. |
Methods
runTest()
runTest(
\Testo\Core\Context\TestInfo $info,
callable $next,
): Testo\Core\Context\TestResultDocumentation inherited from Testo\Pipeline\Middleware\TestRunInterceptor.
$info— Information about the test to be run.$next— Next interceptor or core logic to run the test.