add test for #11604
Adds a test case for #11604 to avoid regressions. The actual issue has been fixed in Symfony 2.3 with the merge of #11615.
This commit is contained in:
parent
6b8fe14f3c
commit
a47a8848c3
@ -851,6 +851,17 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->validateProperty('VALUE', 'someProperty');
|
$this->validateProperty('VALUE', 'someProperty');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* https://github.com/symfony/symfony/issues/11604
|
||||||
|
*/
|
||||||
|
public function testValidatePropertyWithoutConstraints()
|
||||||
|
{
|
||||||
|
$entity = new Entity();
|
||||||
|
$violations = $this->validateProperty($entity, 'lastName');
|
||||||
|
|
||||||
|
$this->assertCount(0, $violations, '->validateProperty() returns no violations if no constraints have been configured for the property being validated');
|
||||||
|
}
|
||||||
|
|
||||||
public function testValidatePropertyValue()
|
public function testValidatePropertyValue()
|
||||||
{
|
{
|
||||||
$test = $this;
|
$test = $this;
|
||||||
@ -970,6 +981,17 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->validatePropertyValue('VALUE', 'someProperty', 'someValue');
|
$this->validatePropertyValue('VALUE', 'someProperty', 'someValue');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* https://github.com/symfony/symfony/issues/11604
|
||||||
|
*/
|
||||||
|
public function testValidatePropertyValueWithoutConstraints()
|
||||||
|
{
|
||||||
|
$entity = new Entity();
|
||||||
|
$violations = $this->validatePropertyValue($entity, 'lastName', 'foo');
|
||||||
|
|
||||||
|
$this->assertCount(0, $violations, '->validatePropertyValue() returns no violations if no constraints have been configured for the property being validated');
|
||||||
|
}
|
||||||
|
|
||||||
public function testValidateObjectOnlyOncePerGroup()
|
public function testValidateObjectOnlyOncePerGroup()
|
||||||
{
|
{
|
||||||
$entity = new Entity();
|
$entity = new Entity();
|
||||||
|
Reference in New Issue
Block a user