public function ExpressionValidatorTest::testSucceedingExpressionAtPropertyLevel in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/validator/Tests/Constraints/ExpressionValidatorTest.php \Symfony\Component\Validator\Tests\Constraints\ExpressionValidatorTest::testSucceedingExpressionAtPropertyLevel()
File
- vendor/
symfony/ validator/ Tests/ Constraints/ ExpressionValidatorTest.php, line 93
Class
Namespace
Symfony\Component\Validator\Tests\ConstraintsCode
public function testSucceedingExpressionAtPropertyLevel() {
$constraint = new Expression('value == this.data');
$object = new Entity();
$object->data = '1';
$this
->setRoot($object);
$this
->setPropertyPath('data');
$this
->setProperty($object, 'data');
$this->validator
->validate('1', $constraint);
$this
->assertNoViolation();
}