public function testFindUnusedTags() { $builder =
new ContainerBuilder();
$builder ->
register('foo', 'Bar\FooClass'
) ->
addTag('kernel.event_listener',
['foo' => 'foo'
]) ->
addTag('kenrel.event_listener',
['bar' => 'bar'
]) ;
$builder->
findTaggedServiceIds('kernel.event_listener'
);
$this->
assertEquals(['kenrel.event_listener'
],
$builder->
findUnusedTags(), '->findUnusedTags() returns an array with unused tags'
);
} public function testFindDefinition() { $container =
new ContainerBuilder();
$container->
setDefinition('foo',
$definition =
new Definition('Bar\FooClass'
));
$container->
setAlias('bar', 'foo'
);
$container->
setAlias('foobar', 'bar'
);
$this->
assertEquals($definition,
$container->
findDefinition('foobar'
), '->findDefinition() returns a Definition'
);
}