You are here

public function NotBlankValidatorTest::testEmptyArrayIsInvalid in Zircon Profile 8

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

File

vendor/symfony/validator/Tests/Constraints/NotBlankValidatorTest.php, line 90

Class

NotBlankValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

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