public function ClosureLoaderTest::testLoad in Zircon Profile 8.0
Same name in this branch
- 8.0 vendor/symfony/routing/Tests/Loader/ClosureLoaderTest.php \Symfony\Component\Routing\Tests\Loader\ClosureLoaderTest::testLoad()
- 8.0 vendor/symfony/dependency-injection/Tests/Loader/ClosureLoaderTest.php \Symfony\Component\DependencyInjection\Tests\Loader\ClosureLoaderTest::testLoad()
Same name and namespace in other branches
- 8 vendor/symfony/routing/Tests/Loader/ClosureLoaderTest.php \Symfony\Component\Routing\Tests\Loader\ClosureLoaderTest::testLoad()
File
- vendor/
symfony/ routing/ Tests/ Loader/ ClosureLoaderTest.php, line 33
Class
Namespace
Symfony\Component\Routing\Tests\LoaderCode
public function testLoad() {
$loader = new ClosureLoader();
$route = new Route('/');
$routes = $loader
->load(function () use ($route) {
$routes = new RouteCollection();
$routes
->add('foo', $route);
return $routes;
});
$this
->assertEquals($route, $routes
->get('foo'), '->load() loads a \\Closure resource');
}