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); }
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); }