public function testUnserializingInvalidStringRaisesException() { $value = 'a:foobar'; $this->setExpectedException('Zend\\Serializer\\Exception\\RuntimeException'); $this->adapter->unserialize($value); }
/** * 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(); }