public function RemoveUnusedDefinitionsPassTest::testProcess in Service Container 7.2
Same name and namespace in other branches
- 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Compiler/RemoveUnusedDefinitionsPassTest.php \Symfony\Component\DependencyInjection\Tests\Compiler\RemoveUnusedDefinitionsPassTest::testProcess()
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Tests/ Compiler/ RemoveUnusedDefinitionsPassTest.php, line 23
Class
Namespace
Symfony\Component\DependencyInjection\Tests\CompilerCode
public function testProcess() {
$container = new ContainerBuilder();
$container
->register('foo')
->setPublic(false);
$container
->register('bar')
->setPublic(false);
$container
->register('moo')
->setArguments(array(
new Reference('bar'),
));
$this
->process($container);
$this
->assertFalse($container
->hasDefinition('foo'));
$this
->assertTrue($container
->hasDefinition('bar'));
$this
->assertTrue($container
->hasDefinition('moo'));
}