public function CardSchemeValidatorTest::testInvalidNumbers in Plug 7
@dataProvider getInvalidNumbers
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Tests/ Constraints/ CardSchemeValidatorTest.php, line 57
Class
Namespace
Symfony\Component\Validator\Tests\ConstraintsCode
public function testInvalidNumbers($scheme, $number, $code) {
$constraint = new CardScheme(array(
'schemes' => $scheme,
'message' => 'myMessage',
));
$this->validator
->validate($number, $constraint);
$this
->buildViolation('myMessage')
->setParameter('{{ value }}', is_string($number) ? '"' . $number . '"' : $number)
->setCode($code)
->assertRaised();
}