public function HttpKernelTest::testHandleWithAResponseListener in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/Tests/HttpKernelTest.php \Symfony\Component\HttpKernel\Tests\HttpKernelTest::testHandleWithAResponseListener()
File
- vendor/
symfony/ http-kernel/ Tests/ HttpKernelTest.php, line 231
Class
Namespace
Symfony\Component\HttpKernel\TestsCode
public function testHandleWithAResponseListener() {
$dispatcher = new EventDispatcher();
$dispatcher
->addListener(KernelEvents::RESPONSE, function ($event) {
$event
->setResponse(new Response('foo'));
});
$kernel = new HttpKernel($dispatcher, $this
->getResolver());
$this
->assertEquals('foo', $kernel
->handle(new Request())
->getContent());
}