function testComplexResponseFunctionTarget(Request $request) { $response = new Response(); return $response->setStatus(234)->setReasonPhrase('Custom Reason')->setHeader('X-My-Header', '1')->addHeader('X-My-Header', '2')->setBody('zanzibar!'); }
public function testArrayAccessOffsetExistsReturnTrueIfArgumentIsAssigned() { $response = new Response(['asgiKey' => 'asgiValue']); $response->setHeader('Foo', 'Bar'); $response->setStatus(201); $response->setReasonPhrase('Foo Found'); $response->setBody('Bar'); $this->assertTrue($response->offsetExists('asgiKey')); $this->assertTrue($response->offsetExists('headers')); $this->assertTrue($response->offsetExists('status')); $this->assertTrue($response->offsetExists('reason')); $this->assertTrue($response->offsetExists('body')); }