public function CollectionValidatorTest::testObjectShouldBeLeftUnchanged

File

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Tests/Constraints/CollectionValidatorTest.php, line 395

Class

CollectionValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function testObjectShouldBeLeftUnchanged() {
  $value = new \ArrayObject(array(
    'foo' => 3,
  ));
  $this->validator
    ->validate($value, new Collection(array(
    'fields' => array(
      'foo' => new Range(array(
        'min' => 2,
      )),
    ),
  )));
  $this
    ->assertEquals(array(
    'foo' => 3,
  ), (array) $value);
}