You are here

public function NotBlankValidatorTest::testBlankIsInvalid in Plug 7

File

lib/Symfony/validator/Symfony/Component/Validator/Tests/Constraints/NotBlankValidatorTest.php, line 64

Class

NotBlankValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

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