toBeInstanceOf(RequestedCouponQuantity::class) ->and($quantity->value)->toBe($value); }); it('rejects a quantity of zero or negative', function (int $value): void { // GIVEN / WHEN $action = fn (): RequestedCouponQuantity => new RequestedCouponQuantity($value); // THEN expect($action)->toThrow(\DomainException::class, 'Quantity should be more than 0.'); })->with([ $zeroValue, $negativeValue, ]); });