public function ContainerBuilderTest::testCreateProxyWithRealServiceInstantiator 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::testCreateProxyWithRealServiceInstantiator()
@covers Symfony\Component\DependencyInjection\ContainerBuilder::createService
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Tests/ ContainerBuilderTest.php, line 290
Class
Namespace
Symfony\Component\DependencyInjection\TestsCode
public function testCreateProxyWithRealServiceInstantiator() {
$builder = new ContainerBuilder();
$builder
->register('foo1', 'Bar\\FooClass')
->setFile(__DIR__ . '/Fixtures/includes/foo.php');
$builder
->getDefinition('foo1')
->setLazy(true);
$foo1 = $builder
->get('foo1');
$this
->assertSame($foo1, $builder
->get('foo1'), 'The same proxy is retrieved on multiple subsequent calls');
$this
->assertSame('Bar\\FooClass', get_class($foo1));
}