public function testReqInfo() { $req = new RequestInfo($this->executor, 'Not Valid JSON'); $this->assertEquals($this->executor, $req->executor()); $req = new RequestInfo($this->executor, '{"p":{}}'); $req->info(); $this->assertEquals($req->info()->{RequestInfo::INFO_RAW_REQUEST}->p, $req->params()); $this->assertEquals($req->info()->{RequestInfo::INFO_RAW_RESPONSE}->r, $req->result()); $this->assertEquals($req->{RequestInfo::INFO_RAW_REQUEST}->p, $req->params()); $this->assertEquals($req->{RequestInfo::INFO_RAW_RESPONSE}->r, $req->result()); $this->assertTrue(isset($req->{RequestInfo::INFO_RAW_RESPONSE}->r)); $this->assertFalse(isset($req->{RequestInfo::INFO_RAW_RESPONSE}->missing)); $this->assertFalse(isset($req->missing)); $req->rawInput(); $req->rawOutput(); }
protected function packError(\FutoIn\AsyncSteps $as, RequestInfo $reqinfo) { $reqinfo_info = $reqinfo->info(); $reqinfo_info->{RequestInfo::INFO_RAW_RESPONSE} = json_encode($reqinfo_info->{RequestInfo::INFO_RAW_RESPONSE}, JSON_UNESCAPED_UNICODE); }