public function ContainerBuilderTest::testFindDefinition in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php \Symfony\Component\DependencyInjection\Tests\ContainerBuilderTest::testFindDefinition()
@covers Symfony\Component\DependencyInjection\ContainerBuilder::findDefinition
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Tests/ ContainerBuilderTest.php, line 532
Class
Namespace
Symfony\Component\DependencyInjection\TestsCode
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');
}