Skip to content

TrialOutcome

Rasuvaeff\PropertyTesting\Runner\TrialOutcome

ClassPackage: property-testing-coreSourceVersion: v0.1.0-12-g86ead85

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,
    ?Throwable $failure,
)
ParameterTypeDefaultDescription
$passedboolrequired
$discardedboolrequired
$failure?Throwablerequired

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.

isPassed()

php
isPassed(): bool

isFailed()

php
isFailed(): bool

isDiscarded()

php
isDiscarded(): bool