You are here

public function TypeValidatorTest::testNullIsValid in Zircon Profile 8

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

File

vendor/symfony/validator/Tests/Constraints/TypeValidatorTest.php, line 32

Class

TypeValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function testNullIsValid() {
  $constraint = new Type(array(
    'type' => 'integer',
  ));
  $this->validator
    ->validate(null, $constraint);
  $this
    ->assertNoViolation();
}