Ejemplo n.º 1
0
 public function testConversion()
 {
     $encryptedData = EncryptedData\Factory::getInstance($this->_xmlDocument);
     $keyInfo = $encryptedData->getKeyInfo();
     $this->assertTrue($keyInfo instanceof \SimpleXMLElement);
     $dom = KeyInfo\XMLDSig::convertToDOM($keyInfo);
     $this->assertTrue($dom instanceof \DOMNode);
     $sxe = KeyInfo\XMLDSig::convertToObject($dom, 'Zend\\InfoCard\\XML\\KeyInfo\\XMLDSig');
     $this->assertTrue($sxe instanceof KeyInfo\XMLDSig);
 }
Ejemplo n.º 2
0
 public function testConvertObjectClassLoad()
 {
     $encryptedData = EncryptedData\Factory::getInstance($this->_xmlDocument);
     $keyInfo = $encryptedData->getKeyInfo();
     $dom = KeyInfo\XMLDSig::convertToDOM($keyInfo);
     try {
         $sxe = KeyInfo\XMLDSig::convertToObject($dom, '\\ZendTest\\InfoCard\\XML\\KeyInfo\\InvalidClassName');
     } catch (Exception\InvalidArgumentException $e) {
     }
 }