/** * Test CCRouter event */ public function testJson() { // create an instance $response = CCResponse::json(array('test1', 'test2'), 200, false); // did it work? $this->assertTrue($response instanceof CCResponse); $this->assertEquals('["test1","test2"]', $response->body); }