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
4242 $ metadata = new ClassMetadata (UserPasswordDummy::class);
4343 self ::assertTrue ((new AttributeLoader ())->loadClassMetadata ($ metadata ));
4444
45- yield 'attribute ' => [$ metadata ->properties [ 'b ' ]->constraints [0 ]];
45+ yield 'attribute ' => [$ metadata ->getPropertyMetadata ( 'b ' )[ 0 ]->getConstraints () [0 ]];
4646 }
4747
4848 public function testAttributes ()
4949 {
5050 $ metadata = new ClassMetadata (UserPasswordDummy::class);
5151 self ::assertTrue ((new AttributeLoader ())->loadClassMetadata ($ metadata ));
5252
53- [$ bConstraint ] = $ metadata ->properties [ 'b ' ]->getConstraints ();
53+ [$ bConstraint ] = $ metadata ->getPropertyMetadata ( 'b ' )[ 0 ]->getConstraints ();
5454 self ::assertSame ('myMessage ' , $ bConstraint ->message );
5555 self ::assertSame (['Default ' , 'UserPasswordDummy ' ], $ bConstraint ->groups );
5656 self ::assertNull ($ bConstraint ->payload );
5757
58- [$ cConstraint ] = $ metadata ->properties [ 'c ' ]->getConstraints ();
58+ [$ cConstraint ] = $ metadata ->getPropertyMetadata ( 'c ' )[ 0 ]->getConstraints ();
5959 self ::assertSame (['my_group ' ], $ cConstraint ->groups );
6060 self ::assertSame ('some attached data ' , $ cConstraint ->payload );
6161 }
You can’t perform that action at this time.
0 commit comments