public function RegexValidatorTest::testInvalidValues

@dataProvider getInvalidValues

File

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Tests/Constraints/RegexValidatorTest.php, line 84

Class

RegexValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function testInvalidValues($value) {
  $constraint = new Regex(array(
    'pattern' => '/^[0-9]+$/',
    'message' => 'myMessage',
  ));
  $this->context
    ->expects($this
    ->once())
    ->method('addViolation')
    ->with('myMessage', array(
    '{{ value }}' => $value,
  ));
  $this->validator
    ->validate($value, $constraint);
}