Example #1
0
 public function testConstruction()
 {
     $result = 1;
     $code = 0;
     $message = 'System error';
     $data = [];
     $error = new Error($code, $message, $data);
     $id = 2;
     $response = new Response($result, $error, $id);
     $this->assertSame($result, $response->getResult());
     $this->assertSame($error, $response->getError());
     $this->assertSame($code, $response->getErrorCode());
     $this->assertSame($message, $response->getErrorMessage());
     $this->assertSame($data, $response->getErrorData());
     $this->assertSame($id, $response->getId());
 }