public function ContainerBuilderTest::testfindTaggedServiceIds in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/dependency-injection/Tests/ContainerBuilderTest.php \Symfony\Component\DependencyInjection\Tests\ContainerBuilderTest::testfindTaggedServiceIds()
@covers Symfony\Component\DependencyInjection\ContainerBuilder::findTaggedServiceIds
File
- vendor/
symfony/ dependency-injection/ Tests/ ContainerBuilderTest.php, line 510
Class
Namespace
Symfony\Component\DependencyInjection\TestsCode
public function testfindTaggedServiceIds() {
$builder = new ContainerBuilder();
$builder
->register('foo', 'Bar\\FooClass')
->addTag('foo', array(
'foo' => 'foo',
))
->addTag('bar', array(
'bar' => 'bar',
))
->addTag('foo', array(
'foofoo' => 'foofoo',
));
$this
->assertEquals($builder
->findTaggedServiceIds('foo'), array(
'foo' => array(
array(
'foo' => 'foo',
),
array(
'foofoo' => 'foofoo',
),
),
), '->findTaggedServiceIds() returns an array of service ids and its tag attributes');
$this
->assertEquals(array(), $builder
->findTaggedServiceIds('foobar'), '->findTaggedServiceIds() returns an empty array if there is annotated services');
}