File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
src/Symfony/Component/Validator/Tests/Constraints Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 1111
1212namespace Symfony \Component \Validator \Tests \Constraints \Fixtures ;
1313
14+ use Symfony \Component \Validator \Constraints \Callback ;
1415use Symfony \Component \Validator \Constraints \NotBlank ;
1516use Symfony \Component \Validator \Constraints \NotNull ;
1617use Symfony \Component \Validator \Constraints \When ;
1718
1819#[When(expression: static function () {
1920 return true ;
20- }, constraints: new NotNull ( )
21+ }, constraints: new Callback ( ' isValid ' )
2122)]
2223class WhenTestWithClosure
2324{
Original file line number Diff line number Diff line change @@ -118,6 +118,8 @@ public function testAttributes()
118118 */
119119 public function testAttributesWithClosure ()
120120 {
121+ $ this ->markTestSkipped ('Requires https://github.com/php/php-src/issues/17851 to be fixed ' );
122+
121123 $ loader = new AttributeLoader ();
122124 $ metadata = new ClassMetadata (WhenTestWithClosure::class);
123125
@@ -129,7 +131,7 @@ public function testAttributesWithClosure()
129131 self ::assertInstanceOf (\Closure::class, $ classConstraint ->expression );
130132 self ::assertEquals ([
131133 new Callback (
132- callback: 'callback ' ,
134+ callback: 'isValid ' ,
133135 groups: ['Default ' , 'WhenTestWithClosure ' ],
134136 ),
135137 ], $ classConstraint ->constraints );
You can’t perform that action at this time.
0 commit comments