lithium\tests\cases\action\ResponseTest::testResponseRenderJson PHP Method

testResponseRenderJson() public method

    public function testResponseRenderJson()
    {
        $this->response->type('json');
        $this->response->body[] = '{"message": "Hello World"}';
        ob_start();
        $this->response->render();
        $result = ob_get_clean();
        $this->assertIdentical('{"message": "Hello World"}', $result);
        $this->assertIdentical('HTTP/1.1 200 OK', $this->response->testHeaders[0]);
    }