You are here

public function IsNullValidatorTest::testInvalidValues in Plug 7

@dataProvider getInvalidValues

File

lib/Symfony/validator/Symfony/Component/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();
}