Skip to content

Commit 5f68cf7

Browse files
committed
test handling of special "value" constraint option
1 parent e6a26db commit 5f68cf7

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)