You are here

public function NotNullValidatorTest::testNullIsInvalid in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/validator/Tests/Constraints/NotNullValidatorTest.php \Symfony\Component\Validator\Tests\Constraints\NotNullValidatorTest::testNullIsInvalid()

File

vendor/symfony/validator/Tests/Constraints/NotNullValidatorTest.php, line 50

Class

NotNullValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function testNullIsInvalid() {
  $constraint = new NotNull(array(
    'message' => 'myMessage',
  ));
  $this->validator
    ->validate(null, $constraint);
  $this
    ->buildViolation('myMessage')
    ->assertRaised();
}