You are here

public function HttpKernelTest::testHandleWhenTheControllerIsAClosure in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-kernel/Tests/HttpKernelTest.php \Symfony\Component\HttpKernel\Tests\HttpKernelTest::testHandleWhenTheControllerIsAClosure()

File

vendor/symfony/http-kernel/Tests/HttpKernelTest.php, line 168

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