public function CardSchemeValidatorTest::getInvalidNumbers in Plug 7
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Tests/ Constraints/ CardSchemeValidatorTest.php, line 114
Class
Namespace
Symfony\Component\Validator\Tests\ConstraintsCode
public function getInvalidNumbers() {
return array(
array(
'VISA',
'42424242424242424242',
CardScheme::INVALID_FORMAT_ERROR,
),
array(
'AMEX',
'357298508610146',
CardScheme::INVALID_FORMAT_ERROR,
),
array(
'DINERS',
'31569309025904',
CardScheme::INVALID_FORMAT_ERROR,
),
array(
'DINERS',
'37088894118515',
CardScheme::INVALID_FORMAT_ERROR,
),
array(
'INSTAPAYMENT',
'6313440808445746',
CardScheme::INVALID_FORMAT_ERROR,
),
array(
'CHINA_UNIONPAY',
'622888888888888',
CardScheme::INVALID_FORMAT_ERROR,
),
array(
'CHINA_UNIONPAY',
'62288888888888888888',
CardScheme::INVALID_FORMAT_ERROR,
),
array(
'AMEX',
'30569309025904',
CardScheme::INVALID_FORMAT_ERROR,
),
// DINERS number
array(
'AMEX',
'invalid',
CardScheme::NOT_NUMERIC_ERROR,
),
// A string
array(
'AMEX',
0,
CardScheme::INVALID_FORMAT_ERROR,
),
// a lone number
array(
'AMEX',
'0',
CardScheme::INVALID_FORMAT_ERROR,
),
// a lone number
array(
'AMEX',
'000000000000',
CardScheme::INVALID_FORMAT_ERROR,
),
// a lone number
array(
'DINERS',
'3056930',
CardScheme::INVALID_FORMAT_ERROR,
),
// only first part of the number
array(
'DISCOVER',
'1117',
CardScheme::INVALID_FORMAT_ERROR,
),
);
}