Skip to content

PropertyTesting ​

Rasuvaeff\PropertyTesting\PhpUnit\PropertyTesting

Trait — Package: property-testing-phpunit — Source — Version: v1.0.0

The fluent entry point a PHPUnit TestCase mixes in:

$this->forAll(['values' => Gen::arrayOf(Gen::int())]) ->runs(300) ->check(function (array $values): void { self::assertSame(sortValues($values), sortValues(sortValues($values))); });

The closure's parameter names select the generators, exactly like a #[Property] method signature does under the Testo adapter. A pass counts one assertion; every failing outcome surfaces as one AssertionFailedError carrying the engine failure as its previous exception.

No public members beyond what is documented above.