class DiscriminatorMapTest extends TestCase
{ public function testGetTypePropertyAndMapping() { $annotation =
new DiscriminatorMap(typeProperty: 'type', mapping:
[ 'foo' => 'FooClass',
'bar' => 'BarClass',
]);
$this->
assertEquals('type',
$annotation->
getTypeProperty());
$this->
assertEquals([ 'foo' => 'FooClass',
'bar' => 'BarClass',
],
$annotation->
getMapping());
} public function testExceptionWithEmptyTypeProperty() { $this->
expectException(InvalidArgumentException::
class);
new DiscriminatorMap(typeProperty: '', mapping:
['foo' => 'FooClass'
]);
}