public function ClosureLoaderTest::testLoad in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Loader/ClosureLoaderTest.php \Symfony\Component\DependencyInjection\Tests\Loader\ClosureLoaderTest::testLoad()
@covers Symfony\Component\DependencyInjection\Loader\ClosureLoader::load
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Tests/ Loader/ ClosureLoaderTest.php, line 33
Class
Namespace
Symfony\Component\DependencyInjection\Tests\LoaderCode
public function testLoad() {
$loader = new ClosureLoader($container = new ContainerBuilder());
$loader
->load(function ($container) {
$container
->setParameter('foo', 'foo');
});
$this
->assertEquals('foo', $container
->getParameter('foo'), '->load() loads a \\Closure resource');
}