You are here

public function IssnValidatorTest::testCaseSensitiveIssns in Plug 7

@dataProvider getValidLowerCasedIssn

File

lib/Symfony/validator/Symfony/Component/Validator/Tests/Constraints/IssnValidatorTest.php, line 126

Class

IssnValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function testCaseSensitiveIssns($issn) {
  $constraint = new Issn(array(
    'caseSensitive' => true,
    'message' => 'myMessage',
  ));
  $this->validator
    ->validate($issn, $constraint);
  $this
    ->buildViolation('myMessage')
    ->setParameter('{{ value }}', '"' . $issn . '"')
    ->setCode(Issn::INVALID_CASE_ERROR)
    ->assertRaised();
}