process() public method

Name chosen to mirror Interop\Http\Middleware\DelegateInterface, and thus imply this should be dispatched from interop middleware. If the route provided is not http-interop middleware, this method will dispatch using callable middleware semantics; otherwise, it dispatches using http-interop semantics.
public process ( Route $route, Psr\Http\Message\RequestInterface $request, callable $next ) : Psr\Http\Message\ResponseInterface
$route Route
$request Psr\Http\Message\RequestInterface
$next callable
return Psr\Http\Message\ResponseInterface
 /**
  * @dataProvider throwablesProvider
  * @group error-handling
  */
 public function testThrowsThrowablesRaisedByInteropMiddlewareWhenRaiseThrowablesFlagIsEnabled($throwable)
 {
     $middleware = $this->prophesize(ServerMiddlewareInterface::class);
     $middleware->process(Argument::type(ServerRequestInterface::class), Argument::type(DelegateInterface::class))->will(function () use($throwable) {
         throw $throwable;
     });
     $route = new Route('/', $middleware->reveal());
     $next = $this->prophesize(Next::class);
     $next->__invoke(Argument::type(ServerRequestInterface::class), Argument::type(ResponseInterface::class), $throwable)->shouldNotBeCalled();
     $dispatch = new Dispatch();
     $dispatch->raiseThrowables();
     try {
         $dispatch->process($route, $this->request->reveal(), $next->reveal());
         $this->fail('Dispatch succeeded and should not have');
     } catch (\Throwable $e) {
         $this->assertSame($throwable, $e, sprintf('Throwable raised is not the one expected: %s', $e->getMessage()));
     } catch (\Exception $e) {
         $this->assertSame($throwable, $e, sprintf('Exception raised is not the one expected: %s', $e->getMessage()));
     }
 }