Ejemplo n.º 1
0
 /**
  * @covers Rrs\Ryzom\VisualSlotTab
  */
 public function testSerialize()
 {
     $buffer = file_get_contents(__DIR__ . '/_files/visual_slot.tab');
     $vs = new VisualSlotManager();
     $vs->load($buffer);
     $expected = serialize($vs);
     // create class and serialize it again.
     // we should get same string back
     $vsNew = unserialize($expected);
     $serialized = serialize($vsNew);
     $this->assertEquals($expected, $serialized);
 }
Ejemplo n.º 2
0
 function exportVisualSlots()
 {
     $this->debug('loading visual_slot.tab');
     /** @var $bnp BnpFile */
     $bnp = $this['bnp.data_common'];
     $buf = $bnp->readFile('visual_slot.tab');
     $vs = new VisualSlotManager();
     $vs->load($buf);
     $vsMap = $vs->getIndexMap();
     $this['export.visual_slot']->export($vsMap, 'visual_slot');
 }