Esempio n. 1
0
 /**
  * @test
  */
 public function testErrorData()
 {
     $this->object = new ErrorData();
     $this->object->init($this->map);
     $this->assertEquals("520003", $this->object->errorId);
     $this->assertEquals("Platform", $this->object->domain);
     $this->assertEquals("Application", $this->object->subdomain);
     $this->assertEquals("Error", $this->object->severity);
     $this->assertEquals("Application", $this->object->category);
     $this->assertEquals("Authentication failed. API credentials are incorrect", $this->object->message);
     $this->assertEquals("520003", $this->object->exceptionId);
     //$this->assertEquals("API Credentials",$this->object->parameter[0]);
     //	$this->assertEquals("Incorrect",$this->object->parameter);
 }
Esempio n. 2
0
 public function init($map = null, $prefix = '')
 {
     if ($map != null) {
         if (PPUtils::array_match_key($map, $prefix . "receiver.")) {
             $newPrefix = $prefix . "receiver.";
             $this->receiver = new Receiver();
             $this->receiver->init($map, $newPrefix);
         }
         if (PPUtils::array_match_key($map, $prefix . "error.")) {
             $newPrefix = $prefix . "error.";
             $this->error = new ErrorData();
             $this->error->init($map, $newPrefix);
         }
     }
 }