You are here

public function LocaleValidatorTest::testInvalidLocales in Zircon Profile 8

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

@dataProvider getInvalidLocales

File

vendor/symfony/validator/Tests/Constraints/LocaleValidatorTest.php, line 76

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