public function testValidDigit() { Assertion::digit(1); Assertion::digit(0); Assertion::digit("0"); }
/** * Validate price: * 0 < $price < 10000 * @param $price */ public static function price($price) { Assert::digit($price); Assert::greaterThan($price, 0); Assert::lessThan($price, 10000); }