You are here

public function CardSchemeValidatorTest::testInvalidNumbers in Plug 7

@dataProvider getInvalidNumbers

File

lib/Symfony/validator/Symfony/Component/Validator/Tests/Constraints/CardSchemeValidatorTest.php, line 57

Class

CardSchemeValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

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();
}