Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f2883ba

Browse filesBrowse files
committed
fix test
1 parent ef5aa96 commit f2883ba
Copy full SHA for f2883ba

File tree

Expand file treeCollapse file tree

1 file changed

+7
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-5
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Tests/Constraints/UniqueValidatorTest.php
+7-5Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -246,14 +246,14 @@ public static function getInvalidFieldNames(): array
246246
/**
247247
* @dataProvider getInvalidCollectionValues
248248
*/
249-
public function testInvalidCollectionValues(array $value, array $fields)
249+
public function testInvalidCollectionValues(array $value, array $fields, string $expectedMessageParam)
250250
{
251251
$this->validator->validate($value, new Unique([
252252
'message' => 'myMessage',
253253
], fields: $fields));
254254

255255
$this->buildViolation('myMessage')
256-
->setParameter('{{ value }}', 'array')
256+
->setParameter('{{ value }}', $expectedMessageParam)
257257
->setCode(Unique::IS_NOT_UNIQUE)
258258
->assertRaised();
259259
}
@@ -264,23 +264,25 @@ public static function getInvalidCollectionValues(): array
264264
'unique string' => [[
265265
['lang' => 'eng', 'translation' => 'hi'],
266266
['lang' => 'eng', 'translation' => 'hello'],
267-
], ['lang']],
267+
], ['lang'], 'array'],
268268
'unique floats' => [[
269269
['latitude' => 51.509865, 'longitude' => -0.118092, 'poi' => 'capital'],
270270
['latitude' => 52.520008, 'longitude' => 13.404954],
271271
['latitude' => 51.509865, 'longitude' => -0.118092],
272-
], ['latitude', 'longitude']],
272+
], ['latitude', 'longitude'], 'array'],
273273
'unique int' => [[
274274
['id' => 1, 'email' => 'bar@email.com'],
275275
['id' => 1, 'email' => 'foo@email.com'],
276-
], ['id']],
276+
], ['id'], 'array'],
277277
'unique null' => [
278278
[null, null],
279279
[],
280+
'null',
280281
],
281282
'unique field null' => [
282283
[['nullField' => null], ['nullField' => null]],
283284
['nullField'],
285+
'array',
284286
],
285287
];
286288
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.