File tree 2 files changed +5
-2
lines changed
src/Symfony/Component/Validator/Tests/Constraints
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Component \Validator \Tests \Constraints \Fixtures ;
13
13
14
+ use Symfony \Component \Validator \Constraints \Callback ;
14
15
use Symfony \Component \Validator \Constraints \NotBlank ;
15
16
use Symfony \Component \Validator \Constraints \NotNull ;
16
17
use Symfony \Component \Validator \Constraints \When ;
17
18
18
19
#[When(expression: static function () {
19
20
return true ;
20
- }, constraints: new NotNull ( )
21
+ }, constraints: new Callback ( ' isValid ' )
21
22
)]
22
23
class WhenTestWithClosure
23
24
{
Original file line number Diff line number Diff line change @@ -118,6 +118,8 @@ public function testAttributes()
118
118
*/
119
119
public function testAttributesWithClosure ()
120
120
{
121
+ $ this ->markTestSkipped ('Requires https://github.com/php/php-src/issues/17851 to be fixed ' );
122
+
121
123
$ loader = new AttributeLoader ();
122
124
$ metadata = new ClassMetadata (WhenTestWithClosure::class);
123
125
@@ -129,7 +131,7 @@ public function testAttributesWithClosure()
129
131
self ::assertInstanceOf (\Closure::class, $ classConstraint ->expression );
130
132
self ::assertEquals ([
131
133
new Callback (
132
- callback: 'callback ' ,
134
+ callback: 'isValid ' ,
133
135
groups: ['Default ' , 'WhenTestWithClosure ' ],
134
136
),
135
137
], $ classConstraint ->constraints );
You can’t perform that action at this time.
0 commit comments