Skip to content

Corpus ​

Rasuvaeff\PropertyTesting\Runner\Corpus

Interface — Package: property-testing-core — Source — Version: v1.0.0-1-g88fdee2

Implemented by: Runner\FilesystemCorpus, Runner\RedisCorpus

Persistent store of past falsifications, replayed before the random phase.

The runner takes it explicitly (?Corpus): no store means no replay and no filesystem access at all. Resolving where the corpus lives (the PROPERTY_DB environment variable under Testo) is the adapter's job.

Methods ​

recall() ​

php
recall(string $id, list<string> $parameterNames): array

The usable entries recorded for the property, cheapest first. Entries that can no longer replay faithfully (foreign format, superseded sequence epoch, a signature that no longer matches) are skipped, not surfaced.

  • $parameterNames — The property's current parameters, in order.

remember() ​

php
remember(
    string $id,
    CounterExample $counterExample,
    list<string> $parameterNames,
): void

Records a falsification's counterexample as the newest entry, preferring its minimised arguments over the bare seed.

  • $parameterNames — The property's current parameters, in order.

prune() ​

php
prune(string $id, Runner\CorpusEntry $entry): void

Drops an entry whose replay no longer fails — the regression is fixed and the entry has served its purpose.