You are here

public function CompositeTest::testSetImplicitNestedGroupsIfExplicitParentGroup in Zircon Profile 8

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

File

vendor/symfony/validator/Tests/Constraints/CompositeTest.php, line 53

Class

CompositeTest
@since 2.6

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

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);
}