You are here

public function CollectionTest::testAcceptRequiredConstraintAsOneElementArray in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/Tests/Constraints/CollectionTest.php \Symfony\Component\Validator\Tests\Constraints\CollectionTest::testAcceptRequiredConstraintAsOneElementArray()

File

vendor/symfony/validator/Tests/Constraints/CollectionTest.php, line 94

Class

CollectionTest
@author Bernhard Schussek <bschussek@gmail.com>

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function testAcceptRequiredConstraintAsOneElementArray() {
  $collection1 = new Collection(array(
    'fields' => array(
      'alternate_email' => array(
        new Required(new Email()),
      ),
    ),
  ));
  $collection2 = new Collection(array(
    'fields' => array(
      'alternate_email' => new Required(new Email()),
    ),
  ));
  $this
    ->assertEquals($collection1, $collection2);
}