We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c43a4e commit 0f61859Copy full SHA for 0f61859
src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php
@@ -35,6 +35,13 @@ public function testEmptyStringIsValid()
35
$this->assertNoViolation();
36
}
37
38
+ public function testEmptyStringFromObjectIsValid()
39
+ {
40
+ $this->validator->validate(new EmailProvider(), new Url());
41
+
42
+ $this->assertNoViolation();
43
+ }
44
45
/**
46
* @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException
47
*/
@@ -171,3 +178,11 @@ public function getValidCustomUrls()
171
178
);
172
179
173
180
181
182
+class EmailProvider
183
+{
184
+ public function __toString()
185
186
+ return '';
187
188
+}
0 commit comments