public function testNoServices() { $this->
expectException(InvalidArgumentException::
class);
$this->
expectExceptionMessage('Invalid definition for service "foo": an array of references is expected as first argument when the "container.service_locator" tag is set.'
);
$container =
new ContainerBuilder();
$container->
register('foo', ServiceLocator::
class) ->
addTag('container.service_locator'
) ;
(new ServiceLocatorTagPass())->
process($container);
} public function testScalarServices() { $container =
new ContainerBuilder();
$container->
register('foo', ServiceLocator::
class) ->
setArguments([[ 'dummy',
]]) ->
addTag('container.service_locator'
) ;