public function ExpressionValidatorTest::testSucceedingExpressionAtObjectLevel in Plug 7
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Tests/ Constraints/ ExpressionValidatorTest.php, line 60
Class
Namespace
Symfony\Component\Validator\Tests\ConstraintsCode
public function testSucceedingExpressionAtObjectLevel() {
$constraint = new Expression('this.data == 1');
$object = new Entity();
$object->data = '1';
$this
->setObject($object);
$this->validator
->validate($object, $constraint);
$this
->assertNoViolation();
}