File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
Bridge/Doctrine/Tests/Validator
Form/Tests/Extension/Validator
Security/Core/Tests/Validator/Constraints Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -214,7 +214,7 @@ public function testClassNoAutoMapping()
214214
215215 /** @var PropertyMetadata[] $autoMappingExplicitlyEnabledMetadata */
216216 $ autoMappingExplicitlyEnabledMetadata = $ classMetadata ->getPropertyMetadata ('autoMappingExplicitlyEnabled ' );
217- $ this ->assertCount (1 , $ autoMappingExplicitlyEnabledMetadata [0 ]->constraints );
217+ $ this ->assertCount (1 , $ autoMappingExplicitlyEnabledMetadata [0 ]->getConstraints () );
218218 $ this ->assertSame (AutoMappingStrategy::ENABLED , $ autoMappingExplicitlyEnabledMetadata [0 ]->getAutoMappingStrategy ());
219219 }
220220}
Original file line number Diff line number Diff line change @@ -42,8 +42,8 @@ public function test2Dot5ValidationApi()
4242 $ this ->assertCount (1 , $ metadata ->getConstraints ());
4343 $ this ->assertInstanceOf (FormConstraint::class, $ metadata ->getConstraints ()[0 ]);
4444
45- $ this ->assertSame (CascadingStrategy::NONE , $ metadata ->cascadingStrategy );
46- $ this ->assertSame (TraversalStrategy::NONE , $ metadata ->traversalStrategy );
45+ $ this ->assertSame (CascadingStrategy::NONE , $ metadata ->getCascadingStrategy () );
46+ $ this ->assertSame (TraversalStrategy::NONE , $ metadata ->getTraversalStrategy () );
4747 $ this ->assertCount (0 , $ metadata ->getPropertyMetadata ('children ' ));
4848 }
4949}
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