public function CompositeTest::testSetImplicitNestedGroupsIfExplicitParentGroup in Plug 7
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Tests/ Constraints/ CompositeTest.php, line 52
Class
- CompositeTest
- @since 2.6 @author Bernhard Schussek <bschussek@gmail.com>
Namespace
Symfony\Component\Validator\Tests\ConstraintsCode
public function testSetImplicitNestedGroupsIfExplicitParentGroup() {
$constraint = new ConcreteComposite(array(
'constraints' => array(
new NotNull(),
new NotBlank(),
),
'groups' => array(
'Default',
'Strict',
),
));
$this
->assertEquals(array(
'Default',
'Strict',
), $constraint->groups);
$this
->assertEquals(array(
'Default',
'Strict',
), $constraint->constraints[0]->groups);
$this
->assertEquals(array(
'Default',
'Strict',
), $constraint->constraints[1]->groups);
}