You are here

public function LanguageValidatorTest::testInvalidLanguages in Plug 7

@dataProvider getInvalidLanguages

File

lib/Symfony/validator/Symfony/Component/Validator/Tests/Constraints/LanguageValidatorTest.php, line 82

Class

LanguageValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function testInvalidLanguages($language) {
  $constraint = new Language(array(
    'message' => 'myMessage',
  ));
  $this->validator
    ->validate($language, $constraint);
  $this
    ->buildViolation('myMessage')
    ->setParameter('{{ value }}', '"' . $language . '"')
    ->assertRaised();
}