You are here

public function LocaleValidatorTest::testInvalidLocales in Plug 7

@dataProvider getInvalidLocales

File

lib/Symfony/validator/Symfony/Component/Validator/Tests/Constraints/LocaleValidatorTest.php, line 84

Class

LocaleValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

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