/** * Implements corresponding isValidXX logic. * * @param string $context Please see corresponding isValidXX description. * @param string $input Please see corresponding isValidXX description. * @param bool $allowNull Please see corresponding isValidXX description. * * @return does not return a value. * @throws ValidationException thrown if input is invalid. * @throws IntrusionException thrown if intrusion is detected. */ private function _assertValidCreditCard($context, $input, $allowNull) { $ccvr = new CreditCardValidationRule('CreditCard', $this->_encoder); $ccvr->setAllowNull($allowNull); $ccvr->assertValid($context, $input); return null; }
/** * ` ` entity does not match a space in preg_match. */ function testCCVR_getValid_nbsp() { $ccvr = new CreditCardValidationRule('CreditCardValidatorLuhn'); $this->setExpectedException('ValidationException'); $ccvr->assertValid('testCCVR_getValid_nbsp', '0000 0000 0000 0018'); }