[Validator] added a failing test
This commit is contained in:
parent
1c43a4e622
commit
0f61859679
|
@ -35,6 +35,13 @@ class UrlValidatorTest extends AbstractConstraintValidatorTest
|
||||||
$this->assertNoViolation();
|
$this->assertNoViolation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testEmptyStringFromObjectIsValid()
|
||||||
|
{
|
||||||
|
$this->validator->validate(new EmailProvider(), new Url());
|
||||||
|
|
||||||
|
$this->assertNoViolation();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException
|
* @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException
|
||||||
*/
|
*/
|
||||||
|
@ -171,3 +178,11 @@ class UrlValidatorTest extends AbstractConstraintValidatorTest
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class EmailProvider
|
||||||
|
{
|
||||||
|
public function __toString()
|
||||||
|
{
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Reference in New Issue