public function RegexValidatorTest::testNullIsValid

File

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Tests/Constraints/RegexValidatorTest.php, line 35

Class

RegexValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function testNullIsValid() {
  $this->context
    ->expects($this
    ->never())
    ->method('addViolation');
  $this->validator
    ->validate(null, new Regex(array(
    'pattern' => '/^[0-9]+$/',
  )));
}