/** * retrieves the request body as a ResponseObject * * returns ResponseObject */ public function getDecodedBody() { return ResponseObjectBuilder::buildFromJSON($this->body); }
public function testResponse() { $response = (new ResponseObjectBuilder())->responseCode(12345)->errorCode('12345')->message('my message')->body('{"message":"text"}')->build(); $this->assertEquals($response, ResponseObjectBuilder::buildFromJSON($response->getJSONString())); }