Example #1
0
 public function testUnserializingInvalidStringRaisesException()
 {
     $value = 'a:foobar';
     $this->setExpectedException('Zend\\Serializer\\Exception\\RuntimeException');
     $this->adapter->unserialize($value);
 }
Example #2
0
 /**
  * Save current state in storage
  *
  * @return void
  */
 protected function save()
 {
     $serializer = new PhpSerialize();
     $this->getStorage()->player = $serializer->serialize($this->player);
     $this->getStorage()->dealer = $serializer->serialize($this->dealer);
     $this->getStorage()->deck = $this->game->getDeck();
     $this->getStorage()->state = $this->getState();
 }