1<?php
2
3declare(strict_types=1);
4
5namespace Metadata\Tests;
6
7use Metadata\PropertyMetadata;
8use PHPUnit\Framework\TestCase;
9
10class PropertyMetadataTest extends TestCase
11{
12    public function testConstructor()
13    {
14        $metadata = new PropertyMetadata('Metadata\Tests\Fixtures\TestObject', 'foo');
15        $this->assertEquals('Metadata\Tests\Fixtures\TestObject', $metadata->class);
16        $this->assertEquals('foo', $metadata->name);
17    }
18
19    public function testSerializeUnserialize()
20    {
21        $metadata = new PropertyMetadata('Metadata\Tests\Fixtures\TestObject', 'foo');
22
23        $this->assertEquals($metadata, unserialize(serialize($metadata)));
24    }
25}
26