Assume
Rasuvaeff\PropertyTesting\Assume
Class — Package: property-testing-core — Source — Version: v1.0.0-1-g88fdee2
Discard a property run when a precondition does not hold.
An attempt discarded via Assume::that() is neither a failure nor a successful check: the property runner retries with another random input. Use it to skip combinations of generated values that are out of the property's domain (e.g. "cap must be >= baseSeconds") instead of rejecting them with a narrow Gen::filter(), which is slower.
Discards do not consume Runner\PropertyConfig::$runs. The runner fails with GaveUpException when Runner\PropertyConfig::$maxDiscards is exceeded; it never prints, so a warning about a high discard share (the adapters warn above 90%) is the adapter's, not the engine's.
Methods
that()
static that(bool $condition): voidDiscard the current run unless the condition is true.