process() public method

Also decorates the $delegator using the CallableMiddlewareWrapper. {@inheritDocs}
public process ( Psr\Http\Message\ServerRequestInterface $request, Interop\Http\Middleware\DelegateInterface $delegate )
$request Psr\Http\Message\ServerRequestInterface
$delegate Interop\Http\Middleware\DelegateInterface
 public function testDecoratedDelegateWillBeInvokedWithOnlyRequest()
 {
     $request = $this->prophesize(ServerRequestInterface::class)->reveal();
     $response = $this->prophesize(ResponseInterface::class)->reveal();
     $expected = $this->prophesize(ResponseInterface::class)->reveal();
     $delegate = $this->prophesize(DelegateInterface::class);
     $delegate->process($request)->willReturn($expected);
     $decorator = new CallableMiddlewareWrapper(function ($request, $response, $next) {
         return $next($request, $response);
     }, $response);
     $this->assertSame($expected, $decorator->process($request, $delegate->reveal()));
 }