You are here

public function LegacyElementMetadataTest::testSerialize in Plug 7

File

lib/Symfony/validator/Symfony/Component/Validator/Tests/Mapping/LegacyElementMetadataTest.php, line 67

Class

LegacyElementMetadataTest
@group legacy

Namespace

Symfony\Component\Validator\Tests\Mapping

Code

public function testSerialize() {
  $this->metadata
    ->addConstraint(new ConstraintA(array(
    'property1' => 'A',
  )));
  $this->metadata
    ->addConstraint(new ConstraintB(array(
    'groups' => 'TestGroup',
  )));
  $metadata = unserialize(serialize($this->metadata));
  $this
    ->assertEquals($this->metadata, $metadata);
}