'world', 'herp' => 'derp'); $result->setResult($callId, $data); $resultString = $result->getMessage(); $this->assertEquals(array(3, $callId, $data), json_decode($resultString, true)); } public function testGetId() { $id = uniqid(); $result = new CallResult(new Connection); $result->setResult($id, array()); $this->assertEquals($id, $result->getId()); } public function testGetData() { $data = array( 'hello' => 'world' , 'recursive' => array( 'the' => 'quick' , 'brown' => 'fox' ) , 'jumps' ); $result = new CallResult(new Connection); $result->setResult(uniqid(), $data); $this->assertEquals($data, $result->getData()); } }