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()
214
214
215
215
/** @var PropertyMetadata[] $autoMappingExplicitlyEnabledMetadata */
216
216
$ autoMappingExplicitlyEnabledMetadata = $ classMetadata ->getPropertyMetadata ('autoMappingExplicitlyEnabled ' );
217
- $ this ->assertCount (1 , $ autoMappingExplicitlyEnabledMetadata [0 ]->constraints );
217
+ $ this ->assertCount (1 , $ autoMappingExplicitlyEnabledMetadata [0 ]->getConstraints () );
218
218
$ this ->assertSame (AutoMappingStrategy::ENABLED , $ autoMappingExplicitlyEnabledMetadata [0 ]->getAutoMappingStrategy ());
219
219
}
220
220
}
Original file line number Diff line number Diff line change @@ -42,8 +42,8 @@ public function test2Dot5ValidationApi()
42
42
$ this ->assertCount (1 , $ metadata ->getConstraints ());
43
43
$ this ->assertInstanceOf (FormConstraint::class, $ metadata ->getConstraints ()[0 ]);
44
44
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 () );
47
47
$ this ->assertCount (0 , $ metadata ->getPropertyMetadata ('children ' ));
48
48
}
49
49
}
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