Skip to content

Property

Rasuvaeff\PropertyTesting\Property

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

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

Marks a test method as a property: the PropertyInterceptor takes over, generating random arguments from a generators method until the property has completed $runs successful checks or exhausted its discard budget.

Attribute arguments in PHP must be constant expressions, so the generators cannot be passed inline. Instead name a method (on the same test case) that returns array<string, ArbitraryInterface>, keyed by parameter name. When $generators is null the runner falls back to a method named <testMethod>Generators.

Свойства

СвойствоТипReadonly
runsintyes
seed?intyes
generators?stringyes
maxShrinks?intyes
examples?stringyes
maxDiscards?intyes
timeoutMs?intyes
budgetMs?intyes