public function testApiAlias(string
$class, string
$expected): void
{ /** @var Entity $entity */
$entity =
new $class();
static::
assertSame($expected,
$entity->
getApiAlias());
} public function testCustomApiAliasHasPrecedence(): void
{ $entity =
new FooBarEntity();
$entity->
internalSetEntityData('custom_entity_name',
new FieldVisibility([]));
static::
assertSame('custom_entity_name',
$entity->
getApiAlias());
}}/**
* @internal
*/
class FooEntity extends Entity
{}