You are here

public function ContainerBuilderTest::testFindDefinition in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/dependency-injection/Tests/ContainerBuilderTest.php \Symfony\Component\DependencyInjection\Tests\ContainerBuilderTest::testFindDefinition()

@covers Symfony\Component\DependencyInjection\ContainerBuilder::findDefinition

File

vendor/symfony/dependency-injection/Tests/ContainerBuilderTest.php, line 531

Class

ContainerBuilderTest

Namespace

Symfony\Component\DependencyInjection\Tests

Code

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');
}