public function CollectionTest::testAcceptOptionalConstraintAsOneElementArray in Plug 7
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Tests/ Constraints/ CollectionTest.php, line 75
Class
- CollectionTest
- @author Bernhard Schussek <bschussek@gmail.com>
Namespace
Symfony\Component\Validator\Tests\ConstraintsCode
public function testAcceptOptionalConstraintAsOneElementArray() {
$collection1 = new Collection(array(
'fields' => array(
'alternate_email' => array(
new Optional(new Email()),
),
),
));
$collection2 = new Collection(array(
'fields' => array(
'alternate_email' => new Optional(new Email()),
),
));
$this
->assertEquals($collection1, $collection2);
}