public function withRequestTarget($requestTarget) { $new = clone $this; $new->request = $this->request->withRequestTarget($requestTarget); return $new; }
/** * @param mixed $requestTarget * @return RequestInterface */ public function withRequestTarget($requestTarget) { $this->request = $this->request->withRequestTarget($requestTarget); return $this; }
public function testWithRequestTarget() { $this->assertNotSame($this->request, $this->request->withRequestTarget('/abc/def')); $this->assertEquals('/abc/def', $this->request->withRequestTarget('/abc/def')->getRequestTarget()); }