You are here

public function AttributeMetadataTest::testGroups in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/serializer/Tests/Mapping/AttributeMetadataTest.php \Symfony\Component\Serializer\Tests\Mapping\AttributeMetadataTest::testGroups()

File

vendor/symfony/serializer/Tests/Mapping/AttributeMetadataTest.php, line 33

Class

AttributeMetadataTest
@author Kévin Dunglas <dunglas@gmail.com>

Namespace

Symfony\Component\Serializer\Tests\Mapping

Code

public function testGroups() {
  $attributeMetadata = new AttributeMetadata('group');
  $attributeMetadata
    ->addGroup('a');
  $attributeMetadata
    ->addGroup('a');
  $attributeMetadata
    ->addGroup('b');
  $this
    ->assertEquals(array(
    'a',
    'b',
  ), $attributeMetadata
    ->getGroups());
}