8000 fix test setup and skip test until bug is fixed in PHP · symfony/symfony@56bd932 · GitHub
[go: up one dir, main page]

Skip to content

Commit 56bd932

Browse files
committed
fix test setup and skip test until bug is fixed in PHP
1 parent f2e8574 commit 56bd932

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/Symfony/Component/Validator/Tests/Constraints/Fixtures/WhenTestWithClosure.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@
1111

1212
namespace Symfony\Component\Validator\Tests\Constraints\Fixtures;
1313

14+
use Symfony\Component\Validator\Constraints\Callback;
1415
use Symfony\Component\Validator\Constraints\NotBlank;
1516
use Symfony\Component\Validator\Constraints\NotNull;
1617
use Symfony\Component\Validator\Constraints\When;
1718

1819
#[When(expression: static function () {
1920
return true;
20-
}, constraints: new NotNull()
21+
}, constraints: new Callback('isValid')
2122
)]
2223
class WhenTestWithClosure
2324
{

src/Symfony/Component/Validator/Tests/Constraints/WhenTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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);

0 commit comments

Comments
 (0)
0