Skip to content

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 ​

php
__construct(
    bool $passed,
    bool $discarded,
    bool $skipped,
    ?\Throwable $failure,
)
ParameterTypeDefaultDescription
$passedboolrequiredThe body returned normally: this run checked the input.
$discardedboolrequiredThe run checked nothing — the input left the domain, or the environment refused to run it.
$skippedboolrequiredThe discard came from the environment rather than from the input; kept out of the corpus prune.
$failure?\ThrowablerequiredWhat the body raised, when it raised anything.

Methods ​

passed() ​

php
static passed(): self

failed() ​

php
static failed(?\Throwable $failure = NULL): self
  • $failure — The assertion or exception the body raised; null when the framework reports failure without a throwable.

discarded() ​

php
static discarded(): self

The 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() ​

php
static skipped(): self

The 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() ​

php
isPassed(): bool

isFailed() ​

php
isFailed(): bool

isDiscarded() ​

php
isDiscarded(): bool

isSkipped() ​

php
isSkipped(): bool

Whether the discard came from the environment rather than from the input leaving the domain.