You are here

public function ExpressionValidatorTest::testExpressionIsEvaluatedWithEmptyStringValue in Plug 7

File

lib/Symfony/validator/Symfony/Component/Validator/Tests/Constraints/ExpressionValidatorTest.php, line 46

Class

ExpressionValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

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