public function NullValidatorTest::testInvalidValues

@dataProvider getInvalidValues

File

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Tests/Constraints/NullValidatorTest.php, line 46

Class

NullValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

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