public function testUnserializeSpecificAdapter() { $adapter = new Adapter\Json(); $value = '"test"'; $expected = $adapter->unserialize($value); $this->assertEquals($expected, Serializer::unserialize($value, array('adapter' => $adapter))); }
public function testUnserialzeInvalid() { $value = 'not a serialized string'; $this->setExpectedException('Zend\\Serializer\\Exception\\RuntimeException', 'Unserialization failed: Decoding failed: Syntax error'); $this->adapter->unserialize($value); }