예제 #1
0
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!');
}
예제 #2
0
 public function testArrayAccessOffsetUnsetAsgiKey()
 {
     $response = new Response(['x' => 'y']);
     $this->assertTrue($response->offsetExists('x'));
     unset($response['x']);
     $this->assertFalse($response->offsetExists('x'));
 }