Skip to content

Commit 60faacd

Browse files
Merge branch '7.1' into 7.2
* 7.1: [Validator] Pass required `requireTld` option to `Url` in tests
2 parents 92c52e9 + 728cec9 commit 60faacd

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function testValidUrls($url)
6565
*/
6666
public function testValidUrlsWithNewLine($url)
6767
{
68-
$this->validator->validate($url."\n", new Url());
68+
$this->validator->validate($url."\n", new Url(requireTld: false));
6969

7070
$this->buildViolation('This value is not a valid URL.')
7171
->setParameter('{{ value }}', '"'.$url."\n".'"')
@@ -108,9 +108,7 @@ public function testValidRelativeUrl($url)
108108
*/
109109
public function testValidRelativeUrlWithNewLine(string $url)
110110
{
111-
$constraint = new Url([
112-
'relativeProtocol' => true,
113-
]);
111+
$constraint = new Url(relativeProtocol: true, requireTld: false);
114112

115113
$this->validator->validate($url."\n", $constraint);
116114

0 commit comments

Comments
 (0)