8000 minor #57406 [DoctrineBridge]  test handling of special "value" const… · symfony/symfony@5036d0f · GitHub
[go: up one dir, main page]

Skip to content

Commit 5036d0f

Browse files
committed
minor #57406 [DoctrineBridge]  test handling of special "value" constraint option (xabbuh)
This PR was merged into the 5.4 branch. Discussion ---------- [DoctrineBridge]  test handling of special "value" constraint option | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT Commits ------- 5f68cf7 test handling of special "value" constraint option
2 parents 5c2633f + 5f68cf7 commit 5036d0f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@ public function testAttributeWithGroupsAndPaylod()
6363
self::assertSame('some attached data', $constraint->payload);
6464
self::assertSame(['some_group'], $constraint->groups);
6565
}
66+
67+
public function testValueOptionConfiguresFields()
68+
{
69+
$constraint = new UniqueEntity(['value' => 'email']);
70+
71+
$this->assertSame('email', $constraint->fields);
72+
}
6673
}
6774

6875
#[UniqueEntity(['email'], message: 'myMessage')]

0 commit comments

Comments
 (0)
0