You are here

public function ClosureLoaderTest::testLoad in Zircon Profile 8.0

Same name in this branch
  1. 8.0 vendor/symfony/routing/Tests/Loader/ClosureLoaderTest.php \Symfony\Component\Routing\Tests\Loader\ClosureLoaderTest::testLoad()
  2. 8.0 vendor/symfony/dependency-injection/Tests/Loader/ClosureLoaderTest.php \Symfony\Component\DependencyInjection\Tests\Loader\ClosureLoaderTest::testLoad()
Same name and namespace in other branches
  1. 8 vendor/symfony/dependency-injection/Tests/Loader/ClosureLoaderTest.php \Symfony\Component\DependencyInjection\Tests\Loader\ClosureLoaderTest::testLoad()

@covers Symfony\Component\DependencyInjection\Loader\ClosureLoader::load

File

vendor/symfony/dependency-injection/Tests/Loader/ClosureLoaderTest.php, line 33

Class

ClosureLoaderTest

Namespace

Symfony\Component\DependencyInjection\Tests\Loader

Code

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