File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Tests/Validator/Constraints Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -42,20 +42,20 @@ public static function provideServiceValidatedConstraints(): iterable
42
42
$ metadata = new ClassMetadata (UserPasswordDummy::class);
43
43
self ::assertTrue ((new AttributeLoader ())->loadClassMetadata ($ metadata ));
44
44
45
- yield 'attribute ' => [$ metadata ->properties [ 'b ' ]->constraints [0 ]];
45
+ yield 'attribute ' => [$ metadata ->getPropertyMetadata ( 'b ' )[ 0 ]->getConstraints () [0 ]];
46
46
}
47
47
48
48
public function testAttributes ()
49
49
{
50
50
$ metadata = new ClassMetadata (UserPasswordDummy::class);
51
51
self ::assertTrue ((new AttributeLoader ())->loadClassMetadata ($ metadata ));
52
52
53
- [$ bConstraint ] = $ metadata ->properties [ 'b ' ]->getConstraints ();
53
+ [$ bConstraint ] = $ metadata ->getPropertyMetadata ( 'b ' )[ 0 ]->getConstraints ();
54
54
self ::assertSame ('myMessage ' , $ bConstraint ->message );
55
55
self ::assertSame (['Default ' , 'UserPasswordDummy ' ], $ bConstraint ->groups );
56
56
self ::assertNull ($ bConstraint ->payload );
57
57
58
- [$ cConstraint ] = $ metadata ->properties [ 'c ' ]->getConstraints ();
58
+ [$ cConstraint ] = $ metadata ->getPropertyMetadata ( 'c ' )[ 0 ]->getConstraints ();
59
59
self ::assertSame (['my_group ' ], $ cConstraint ->groups );
60
60
self ::assertSame ('some attached data ' , $ cConstraint ->payload );
61
61
}
You can’t perform that action at this time.
0 commit comments