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

testToStringWithCookies() public method

    public function testToStringWithCookies()
    {
        $expected = join("\r\n", array('HTTP/1.1 200 OK', 'Connection: close', 'Content-Type: text/html;charset=UTF-8', 'Set-Cookie: Name=Marty%20McFly; Domain=.hillvalley.us; Secure', 'Set-Cookie: Destination=The%20Future; Expires=Wed, 21-Oct-2015 23:29:00 GMT', '', 'Great Scott!'));
        $config = array('protocol' => 'HTTP/1.1', 'version' => '1.1', 'status' => array('code' => '200', 'message' => 'OK'), 'headers' => array('Connection' => 'close', 'Content-Type' => 'text/html;charset=UTF-8'), 'cookies' => array('Name' => array('value' => 'Marty McFly', 'domain' => '.hillvalley.us', 'secure' => true), 'Destination' => array('value' => 'The Future', 'expires' => 'Oct 21 2015 4:29 PM PDT')), 'type' => 'text/html', 'encoding' => 'UTF-8', 'body' => 'Great Scott!');
        $response = new Response($config);
        $this->assertEqual($expected, (string) $response);
    }