/** * Get the document returned in the body (JSON decoded) * * @return mixed */ public function getDocument() { if (!$this->document) { require_once 'Sopha/Json.php'; $this->document = Sopha_Json::decode($this->body); } return $this->document; }
/** * Test encoding and decoding in a single step * @param array $values array of values to test against encode/decode */ protected function _testJson($values) { $encoded = Sopha_Json::encode($values); $this->assertEquals($values, Sopha_Json::decode($encoded)); }