public function RemoveUnusedDefinitionsPassTest::testProcess in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/dependency-injection/Tests/Compiler/RemoveUnusedDefinitionsPassTest.php \Symfony\Component\DependencyInjection\Tests\Compiler\RemoveUnusedDefinitionsPassTest::testProcess()
File
- vendor/
symfony/ dependency-injection/ 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'));
}