use Symfony\Component\Serializer\Tests\Fixtures\Attributes\ContextDummyParent;
/**
* @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
*/
trait ContextMappingTestTrait
{ abstract protected function getLoaderForContextMapping(): LoaderInterface;
public function testLoadContexts() { $this->
assertLoadedContexts();
} public function assertLoadedContexts(string
$dummyClass = ContextDummy::
class, string
$parentClass = ContextDummyParent::
class): void
{ $loader =
$this->
getLoaderForContextMapping();
$classMetadata =
new ClassMetadata($dummyClass);
$parentClassMetadata =
new ClassMetadata($parentClass);
$loader->
loadClassMetadata($parentClassMetadata);
$classMetadata->
merge($parentClassMetadata);