public function fromStdObj(stdClass $obj) { foreach ($obj->storage as $item) { $this->add(Item::fromStdObj($item)); } return $this; }
public function testFromStdObj() { $json = json_encode($this->item); $this->assertEquals($this->item, ItemInstance::fromStdObj(json_decode($json))); }