You are here

public function IsNullValidatorTest::testInvalidValues in Zircon Profile 8

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

@dataProvider getInvalidValues

File

vendor/symfony/validator/Tests/Constraints/IsNullValidatorTest.php, line 40

Class

IsNullValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function testInvalidValues($value, $valueAsString) {
  $constraint = new IsNull(array(
    'message' => 'myMessage',
  ));
  $this->validator
    ->validate($value, $constraint);
  $this
    ->buildViolation('myMessage')
    ->setParameter('{{ value }}', $valueAsString)
    ->assertRaised();
}