8000 - · symfony/symfony@b809689 · GitHub
[go: up one dir, main page]

Skip to content

Commit b809689

Browse files
committed
-
1 parent 7635bcd commit b809689

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

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

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -429,19 +429,11 @@ public function getInvalidHSLA(): array
429429
];
430430
}
431431

432-
public function testUnknownFormatAsStringThrowsException()
432+
public function testUnknownFormatsOnValidateTriggerException()
433433
{
434434
$this->expectException(\InvalidArgumentException::class);
435435
$this->expectExceptionMessage('The "formats" parameter value is not valid. It must contain one or more of the following values: "hex_long, hex_long_with_alpha, hex_short, hex_short_with_alpha, basic_named_colors, extended_named_colors, system_colors, keywords, rgb, rgba, hsl, hsla".');
436-
437-
new CssColor('Unknown Format');
438-
}
439-
440-
public function testUnknownFormatAsArrayThrowsException()
441-
{
442-
$this->expectException(\InvalidArgumentException::class);
443-
$this->expectExceptionMessage('The "formats" parameter value is not valid. It must contain one or more of the following values: "hex_long, hex_long_with_alpha, hex_short, hex_short_with_alpha, basic_named_colors, extended_named_colors, system_colors, keywords, rgb, rgba, hsl, hsla".');
444-
445-
new CssColor(['Unknown Format']);
436+
$constraint = new CssColor('Unknown Format');
437+
$this->validator->validate('#F4B907', $constraint);
446438
}
447439
}

0 commit comments

Comments
 (0)
0