public function CollectionValidatorTest::testObjectShouldBeLeftUnchanged in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/validator/Tests/Constraints/CollectionValidatorTest.php \Symfony\Component\Validator\Tests\Constraints\CollectionValidatorTest::testObjectShouldBeLeftUnchanged()
File
- vendor/
symfony/ validator/ Tests/ Constraints/ CollectionValidatorTest.php, line 369
Class
Namespace
Symfony\Component\Validator\Tests\ConstraintsCode
public function testObjectShouldBeLeftUnchanged() {
$value = new \ArrayObject(array(
'foo' => 3,
));
$constraint = new Range(array(
'min' => 2,
));
$this
->expectValidateValueAt(0, '[foo]', $value['foo'], array(
$constraint,
));
$this->validator
->validate($value, new Collection(array(
'fields' => array(
'foo' => $constraint,
),
)));
$this
->assertEquals(array(
'foo' => 3,
), (array) $value);
}