TrialOutcome
Rasuvaeff\PropertyTesting\Runner\TrialOutcome
Class — Package: property-testing-core — Source — Version: v1.0.0-1-g88fdee2
Result of executing the property body once, in the engine's terms.
Every framework reports failure its own way — Testo through a TestResult status, PHPUnit through an assertion exception, a bare callable by throwing. The adapter's Runner\TrialExecutor folds its way into this single shape so the run/shrink loop never learns about framework types.
Constructor
__construct(
bool $passed,
bool $discarded,
bool $skipped,
?\Throwable $failure,
)| Parameter | Type | Default | Description |
|---|---|---|---|
$passed | bool | required | The body returned normally: this run checked the input. |
$discarded | bool | required | The run checked nothing — the input left the domain, or the environment refused to run it. |
$skipped | bool | required | The discard came from the environment rather than from the input; kept out of the corpus prune. |
$failure | ?\Throwable | required | What the body raised, when it raised anything. |
Methods
passed()
static passed(): selffailed()
static failed(?\Throwable $failure = NULL): self$failure— The assertion or exception the body raised; null when the framework reports failure without a throwable.
discarded()
static discarded(): selfThe run was discarded via Assume::that() — neither a failure nor a successful check. The input left the property's domain, which is a statement about the input: a recorded regression that discards on replay can never falsify again and is pruned.
skipped()
static skipped(): selfThe environment refused to run the body — a markTestSkipped() guarding a missing dependency, a framework skip raised from a lifecycle hook. It counts as a discard everywhere a discard counts, with one exception: it says nothing about the input, so a recorded regression that only skipped is kept rather than pruned. Deleting it would erase the counterexample for every environment because one environment could not check it.
isPassed()
isPassed(): boolisFailed()
isFailed(): boolisDiscarded()
isDiscarded(): boolisSkipped()
isSkipped(): boolWhether the discard came from the environment rather than from the input leaving the domain.