src/fkooman/Http/Response.php
public function toArray()
    {
        $output = [];
        $output[] = sprintf(
            'HTTP/1.1 %s %s',
            $this->statusCode,
            self::codeToReason($this->statusCode)
        );
        foreach ($this->headers as $k => $v) {
            $output[] = sprintf('%s: %s', $k, $v);
        }
        $output[] = '';
        $output[] = $this->body;

        return $output;
    }
public function toArray()
    {
        $output = [];
        $output[] = sprintf(
            'HTTP/1.1 %s %s',
            $this->statusCode,
            self::codeToReason($this->statusCode)
        );
        foreach ($this->headers as $k => $v) {
            $output[] = sprintf('%s: %s', $k, $v);
        }
        $output[] = '';
        $output[] = $this->body;

        return $output;
    }
public function toArray ( ) { $ output = [ ] ; $ output [ ] = sprintf ( 'HTTP/1.1 %s %s' , $ this -> statusCode , self :: codeToReason ( $ this -> statusCode ) ) ; foreach ( $ this -> headers as $ k => $ v ) { $ output [ ] = sprintf ( '%s: %s' , $ k , $ v ) ; } $ output [ ] = '' ; $ output [ ] = $ this -> body ; return $ output ; }
Convert the full response to array for the purpose of unit testing.
Convert the full response to array for the purpose of unit testing .