public function LanguageValidatorTest::testInvalidLanguages

@dataProvider getInvalidLanguages

File

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Tests/Constraints/LanguageValidatorTest.php, line 85

Class

LanguageValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function testInvalidLanguages($language) {
  $constraint = new Language(array(
    'message' => 'myMessage',
  ));
  $this->context
    ->expects($this
    ->once())
    ->method('addViolation')
    ->with('myMessage', array(
    '{{ value }}' => $language,
  ));
  $this->validator
    ->validate($language, $constraint);
}