8000 [Validator] added a failing test · symfony/symfony@0f61859 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0f61859

Browse files
committed
[Validator] added a failing test
1 parent 1c43a4e commit 0f61859

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ public function testEmptyStringIsValid()
3535
$this->assertNoViolation();
3636
}
3737

38+
public function testEmptyStringFromObjectIsValid()
39+
{
40+
$this->validator->validate(new EmailProvider(), new Url());
41+
42+
$this->assertNoViolation();
43+
}
44+
3845
/**
3946
* @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException
4047
*/
@@ -171,3 +178,11 @@ public function getValidCustomUrls()
171178
);
172179
}
173180
}
181+
182+
class EmailProvider
183+
{
184+
public function __toString()
185+
{
186+
return '';
187+
}
188+
}

0 commit comments

Comments
 (0)
0