Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 444 Bytes

README.md

File metadata and controls

16 lines (11 loc) · 444 Bytes

Stack/CallableHttpKernel

HttpKernelInterface implementation based on callables.

It's mostly useful to test stack middlewares, and to mock the HttpKernelInterface on the fly.

Example

use Stack\CallableHttpKernel;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

$app = new CallableHttpKernel(function (Request $request) {
    return new Response('Hello World!');
});