public function testEntityRepositoryAutowiring(): void
{ $container =
new ContainerBuilder();
$container->
register(CustomerAddressDefinition::
class, CustomerAddressDefinition::
class) ->
addTag('shopware.entity.definition'
);
$container->
register(CustomerDefinition::
class, CustomerDefinition::
class) ->
addTag('shopware.entity.definition'
);
$container->
register(DefinitionInstanceRegistry::
class, DefinitionInstanceRegistry::
class) ->
addArgument(new Reference('service_container'
)) ->
addArgument([ CustomerDefinition::ENTITY_NAME => CustomerDefinition::
class,
CustomerAddressDefinition::ENTITY_NAME => CustomerAddressDefinition::
class,
]) ->
addArgument([ CustomerDefinition::ENTITY_NAME => 'customer.repository',
CustomerAddressDefinition::ENTITY_NAME => 'customer_address.repository',
]);
$entityCompilerPass =
new EntityCompilerPass();
$entityCompilerPass->
process($container);