Esempio n. 1
0
 public function testKeyInfo()
 {
     try {
         Zend_InfoCard_Xml_KeyInfo::getInstance("<foo/>");
         $this->fail("Expected Exception Not thrown");
     } catch (Exception $e) {
         /* yay */
     }
     try {
         Zend_InfoCard_Xml_KeyInfo::getInstance(10);
         $this->fail("Expected Exception Not thrown");
     } catch (Exception $e) {
         /* yay */
     }
 }
Esempio n. 2
0
 /**
  * Returns the KeyInfo Block
  *
  * @return Zend_InfoCard_Xml_KeyInfo_Abstract
  */
 public function getKeyInfo()
 {
     return Zend_InfoCard_Xml_KeyInfo::getInstance($this->KeyInfo[0]);
 }
Esempio n. 3
0
 /**
  * Returns the KeyInfo block object
  *
  * @throws Zend_InfoCard_Xml_Exception
  * @return Zend_InfoCard_Xml_KeyInfo_Abstract
  */
 public function getKeyInfo()
 {
     if (isset($this->KeyInfo)) {
         return Zend_InfoCard_Xml_KeyInfo::getInstance($this->KeyInfo);
     }
     throw new Zend_InfoCard_Xml_Exception("Unable to locate a KeyInfo block");
 }