Example #1
0
 public function testUnserialzeInvalidWddx()
 {
     if (!class_exists('SimpleXMLElement', false)) {
         $this->markTestSkipped('Skipped by missing ext/simplexml');
     }
     $value = '<wddxPacket version=\'1.0\'><header /></wddxPacket>';
     $this->setExpectedException('Zend\\Serializer\\Exception\\RuntimeException', 'Invalid wddx packet');
     $this->adapter->unserialize($value);
 }
Example #2
0
 public function testShouldThrowExceptionIfXmlToUnserializeFromContainsADoctype()
 {
     $value = '<!DOCTYPE>' . '<wddxPacket version=\'1.0\'><header/>' . '<data><string>test</string></data></wddxPacket>';
     $this->setExpectedException("Zend\\Serializer\\Exception\\RuntimeException");
     $data = $this->adapter->unserialize($value);
 }