public function NotBlankValidatorTest::testEmptyArrayIsInvalid

File

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Tests/Constraints/NotBlankValidatorTest.php, line 96

Class

NotBlankValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function testEmptyArrayIsInvalid() {
  $constraint = new NotBlank(array(
    'message' => 'myMessage',
  ));
  $this->context
    ->expects($this
    ->once())
    ->method('addViolation')
    ->with('myMessage');
  $this->validator
    ->validate(array(), $constraint);
}