Example #1
0
 public function testDeserializeEmbeddedRecordWithClass()
 {
     $result = Deserializer::deserialize('foo:(bar@a: 1, b:2, c: #12:10)');
     $this->assertEquals(['foo' => ['@class' => 'bar', 'a' => 1, 'b' => 2, 'c' => new ID(12, 10)]], $result);
 }
Example #2
0
 /**
  * Read a serialized object from the remote server.
  *
  * @return mixed
  */
 protected function readSerialized()
 {
     $serialized = $this->readString();
     return Deserializer::deserialize($serialized);
 }