You are here

public function CardSchemeValidatorTest::testInvalidNumbers in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/Tests/Constraints/CardSchemeValidatorTest.php \Symfony\Component\Validator\Tests\Constraints\CardSchemeValidatorTest::testInvalidNumbers()

@dataProvider getInvalidNumbers

File

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