$loader->
registerClasses( (new Definition())->
setAutoconfigured(true
),
'Symfony\Component\DependencyInjection\Tests\Fixtures\PrototypeAsAlias\\',
$resource );
$this->
assertEquals($expectedAliases,
$container->
getAliases());
} public static function provideResourcesWithAsAliasAttributes(): iterable
{ yield 'Private' =>
['PrototypeAsAlias/{WithAsAlias,AliasFooInterface}.php',
[AliasFooInterface::
class => new Alias(WithAsAlias::
class)]];
yield 'Interface' =>
['PrototypeAsAlias/{WithAsAliasInterface,AliasFooInterface}.php',
[AliasFooInterface::
class => new Alias(WithAsAliasInterface::
class)]];
yield 'Multiple' =>
['PrototypeAsAlias/{WithAsAliasMultiple,AliasFooInterface}.php',
[ AliasFooInterface::
class => new Alias(WithAsAliasMultiple::
class, true
),
'some-alias' =>
new Alias(WithAsAliasMultiple::
class),
]];
yield 'Multiple with id' =>
['PrototypeAsAlias/{WithAsAliasIdMultipleInterface,AliasBarInterface,AliasFooInterface}.php',
[ AliasBarInterface::
class => new Alias(WithAsAliasIdMultipleInterface::
class),
AliasFooInterface::
class => new Alias(WithAsAliasIdMultipleInterface::
class),
]];
}