VerificationFailed
Rasuvaeff\Understudy\Exception\VerificationFailed
Class — Package: rasuvaeff/understudy — Source — Version: v0.4.1
Extends: RuntimeException
Implements: Throwable, Stringable, Exception\UnderstudyError
A verification about what the code under test did (or did not) do failed.
This is the one exception that reports on the tested code rather than on misuse of Understudy, so adapters map it to a test failure.
The message is the rendered report for a human; Exception\failures() carries the same facts as VerificationFailure records for tooling. Both are built from one list — there is no path where they disagree.
Constructor
php
__construct(
string $message,
list<\VerificationFailure> $failures,
)| Parameter | Type | Default | Description |
|---|---|---|---|
$message | string | required | |
$failures | list<\VerificationFailure> | required |
Methods
of()
php
static of(non-empty-list<\VerificationFailure> $failures): selffailures()
php
failures(): arrayEvery failure this exception reports, in the order the message states them. Non-empty whenever this exception was thrown by Understudy.