CounterExample
Rasuvaeff\PropertyTesting\CounterExample
Class — Source
Minimal failing input for a property, captured at falsification time.
Carries both the original (randomly generated) counterexample and the shrunk (minimised) one, plus the seed needed to reproduce the run.
Properties
| Property | Type | Readonly |
|---|---|---|
seed | int | yes |
runsBeforeFailure | int | yes |
originalArguments | array | yes |
shrunkArguments | array | yes |
shrinkSteps | int | yes |
failure | ?Throwable | yes |
skips | int | yes |
shrinkTrials | int | yes |
Methods
toArray()
php
toArray(): arrayMachine-readable representation suitable for reporters and serialization.
toJson()
php
toJson(bool $pretty): stringtoExamplesCode()
php
toExamplesCode(string $methodName): string