[Validator] fixed some legacy tests
This commit is contained in:
parent
f187d9aa1c
commit
5fcfd1b9f6
@ -35,8 +35,10 @@ class MemberMetadataTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->metadata = null;
|
$this->metadata = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testAddValidSetsMemberToCascaded()
|
public function testLegacyAddValidSetsMemberToCascaded()
|
||||||
{
|
{
|
||||||
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$result = $this->metadata->addConstraint(new Valid());
|
$result = $this->metadata->addConstraint(new Valid());
|
||||||
|
|
||||||
$this->assertEquals(array(), $this->metadata->getConstraints());
|
$this->assertEquals(array(), $this->metadata->getConstraints());
|
||||||
@ -44,8 +46,10 @@ class MemberMetadataTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue($this->metadata->isCascaded());
|
$this->assertTrue($this->metadata->isCascaded());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testAddOtherConstraintDoesNotSetMemberToCascaded()
|
public function testLegacyAddOtherConstraintDoesNotSetMemberToCascaded()
|
||||||
{
|
{
|
||||||
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$result = $this->metadata->addConstraint($constraint = new ConstraintA());
|
$result = $this->metadata->addConstraint($constraint = new ConstraintA());
|
||||||
|
|
||||||
$this->assertEquals(array($constraint), $this->metadata->getConstraints());
|
$this->assertEquals(array($constraint), $this->metadata->getConstraints());
|
||||||
|
Reference in New Issue
Block a user