lithium\tests\cases\net\http\ResponseTest::testToString PHP Method

testToString() public method

public testToString ( )
    public function testToString()
    {
        $expected = join("\r\n", array('HTTP/1.1 200 OK', 'Header: Value', 'Connection: close', 'Content-Type: text/html;charset=UTF-8', '', 'Test!'));
        $config = array('protocol' => 'HTTP/1.1', 'version' => '1.1', 'status' => array('code' => '200', 'message' => 'OK'), 'headers' => array('Header' => 'Value', 'Connection' => 'close', 'Content-Type' => 'text/html;charset=UTF-8'), 'type' => 'text/html', 'encoding' => 'UTF-8', 'body' => 'Test!');
        $response = new Response($config);
        $this->assertEqual($expected, (string) $response);
    }