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 14
14
use PHPUnit \Framework \TestCase ;
15
15
use Symfony \Component \Security \Core \Validator \Constraints \UserPassword ;
16
16
use Symfony \Component \Validator \Mapping \ClassMetadata ;
17
- use Symfony \Component \Validator \Mapping \Loader \AnnotationLoader ;
17
+ use Symfony \Component \Validator \Mapping \Loader \AttributeLoader ;
18
18
19
19
class UserPasswordTest extends TestCase
20
20
{
@@ -40,15 +40,15 @@ public static function provideServiceValidatedConstraints(): iterable
40
40
yield 'named arguments ' => [new UserPassword (service: 'my_service ' )];
41
41
42
42
$ metadata = new ClassMetadata (UserPasswordDummy::class);
43
- self ::assertTrue ((new AnnotationLoader ())->loadClassMetadata ($ metadata ));
43
+ self ::assertTrue ((new AttributeLoader ())->loadClassMetadata ($ metadata ));
44
44
45
45
yield 'attribute ' => [$ metadata ->properties ['b ' ]->constraints [0 ]];
46
46
}
47
47
48
48
public function testAttributes ()
49
49
{
50
50
$ metadata = new ClassMetadata (UserPasswordDummy::class);
51
- self ::assertTrue ((new AnnotationLoader ())->loadClassMetadata ($ metadata ));
51
+ self ::assertTrue ((new AttributeLoader ())->loadClassMetadata ($ metadata ));
52
52
53
53
[$ bConstraint ] = $ metadata ->properties ['b ' ]->getConstraints ();
54
54
self ::assertSame ('myMessage ' , $ bConstraint ->message );
You can’t perform that action at this time.
0 commit comments