Skip to content

Commit fc9d69b

Browse files
committed
feat(when constraint): pass context and root
1 parent 5cc0bae commit fc9d69b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Validator/Tests/Constraints/WhenValidatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function testConstraintsAreExecutedWithNestedObject()
104104
$this->expectValidateValue(0, $number->value, $constraints);
105105

106106
$this->validator->validate($number->value, new When([
107-
'expression' => 'context.root.ok === true',
107+
'expression' => 'context.getRoot().ok === true',
108108
'constraints' => $constraints,
109109
]));
110110
}

0 commit comments

Comments
 (0)