1<?php
2
3declare(strict_types=1);
4
5namespace JMS\Serializer\Tests\Metadata;
6
7use JMS\Serializer\Metadata\PropertyMetadata;
8use JMS\Serializer\Tests\Fixtures\SimpleObject;
9
10class PropertyMetadataTest extends AbstractPropertyMetadataTest
11{
12    public function testSerialization()
13    {
14        $meta = new PropertyMetadata(SimpleObject::class, 'foo');
15        $this->setNonDefaultMetadataValues($meta);
16        $meta->getter = 'getFoo';
17        $meta->setter = 'setFoo';
18        $meta->readOnly = true;
19
20        $restoredMeta = unserialize(serialize($meta));
21        $this->assertEquals($meta, $restoredMeta);
22    }
23}
24