Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cb9c1c4

Browse files
henry2778derrabus
andcommitted
simplify test case
Co-authored-by: Alexander M. Turek <[email protected]>
1 parent 0796051 commit cb9c1c4

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,9 @@ public function getCallback()
178178

179179
public function testExpectsInvalidNonStrictComparison()
180180
{
181-
$callback = static function ($item) {
182-
return (int) $item;
183-
};
184-
185181
$this->validator->validate([1, '1', 1.0, '1.0'], new Unique([
186182
'message' => 'myMessage',
187-
'normalizer' => $callback,
183+
'normalizer' => 'intval',
188184
]));
189185

190186
$this->buildViolation('myMessage')

0 commit comments

Comments
 (0)