Skip to content

PostconditionViolation

Rasuvaeff\PropertyTesting\StateMachine\PostconditionViolation

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

Extends: RuntimeException

Implements: Stringable, Throwable

Thrown by StateMachine::check() when a command's Command::postCondition() returns false.

Carries the executed trace (command labels up to and including the failing one), the failing command, and the pre-state model and observed result, so the property runner surfaces exactly which step of the sequence broke.

Constructor

php
__construct(
    list<string> $trace,
    int $step,
    StateMachine\Command $command,
    mixed $model,
    mixed $result,
)
ParameterTypeDefaultDescription
$tracelist<string>requiredLabels of the commands executed up to and including the failing one.
$stepintrequired
$commandStateMachine\Commandrequired
$modelmixedrequired
$resultmixedrequired