Skip to content

CounterExample

Rasuvaeff\PropertyTesting\CounterExample

КлассИсходник

Текст ниже — на английском, из PHPDoc в исходном коде.

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.

Свойства

СвойствоТипReadonly
seedintyes
runsBeforeFailureintyes
originalArgumentsarrayyes
shrunkArgumentsarrayyes
shrinkStepsintyes
failure?Throwableyes
skipsintyes
shrinkTrialsintyes

Методы

toArray()

php
toArray(): array

Machine-readable representation suitable for reporters and serialization.

toJson()

php
toJson(bool $pretty): string

toExamplesCode()

php
toExamplesCode(string $methodName): string