setResponsePrototype() public method

public setResponsePrototype ( Psr\Http\Message\ResponseInterface $prototype ) : void
$prototype Psr\Http\Message\ResponseInterface
return void
 public function testWillDecorateCallableArrayMiddlewareWithoutErrors()
 {
     $pipeline = new MiddlewarePipe();
     $pipeline->setResponsePrototype($this->response);
     $middleware = [$this, 'sampleMiddleware'];
     $pipeline->pipe($middleware);
     $r = new ReflectionProperty($pipeline, 'pipeline');
     $r->setAccessible(true);
     $queue = $r->getValue($pipeline);
     $route = $queue->dequeue();
     $test = $route->handler;
     $this->assertInstanceOf(CallableMiddlewareWrapper::class, $test);
     $this->assertAttributeSame($middleware, 'middleware', $test);
 }