Пример #1
0
 public function testFunctioning()
 {
     $this->parcel->setMessage("za message");
     $php = json_decode($this->parcel->toJson(), true);
     $this->assertEquals("za message", $php["message"]);
 }
Пример #2
0
 public function toJson()
 {
     $array = parent::toArray();
     $array["data"] = $this->data;
     return json_encode($array);
 }