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