You are here

public function IsTrueValidatorTest::testFalseIsInvalid in Plug 7

File

lib/Symfony/validator/Symfony/Component/Validator/Tests/Constraints/IsTrueValidatorTest.php, line 44

Class

IsTrueValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

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