/** * Test RuleNotImplementedException. * @covers Rentalhost\VanillaValidation\ValidationRulesSingleton::validate */ public function testRuleNotImplementedException() { $this->expectException(Exception\RuleNotImplementedException::class); $fieldRule = new ValidationFieldRule('undefined'); ValidationRules::validate($fieldRule, null); }
/** * Validate this rule with value. * * @param mixed $value Value to validate. * * @return Result */ public function validate($value) { return ValidationRules::validate($this, $value); }