public function HttpKernelTest::testHandleWhenTheControllerIsAClosure

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php, line 160

Class

HttpKernelTest

Namespace

Symfony\Component\HttpKernel\Tests

Code

public function testHandleWhenTheControllerIsAClosure() {
  $response = new Response('foo');
  $dispatcher = new EventDispatcher();
  $kernel = new HttpKernel($dispatcher, $this
    ->getResolver(function () use ($response) {
    return $response;
  }));
  $this
    ->assertSame($response, $kernel
    ->handle(new Request()));
}