class AutoAliasServicePassTest extends TestCase
{ public function testProcessWithMissingParameter() { $this->
expectException(ParameterNotFoundException::
class);
$container =
new ContainerBuilder();
$container->
register('example'
) ->
addTag('auto_alias',
['format' => '%non_existing%.example'
]);
$pass =
new AutoAliasServicePass();
$pass->
process($container);
} public function testProcessWithMissingFormat() { $this->
expectException(InvalidArgumentException::
class);
$container =
new ContainerBuilder();
$container->
register('example'
) ->
addTag('auto_alias',
[]);
$container->
setParameter('existing', 'mysql'
);