public function testKeyInfo() { try { KeyInfo\KeyInfo::getInstance("<foo/>"); $this->fail("Expected Exception Not thrown"); } catch (\Exception $e) { /* yay */ } try { KeyInfo\KeyInfo::getInstance(10); $this->fail("Expected Exception Not thrown"); } catch (\Exception $e) { /* yay */ } }
/** * Returns the KeyInfo Block * * @return \Zend\InfoCard\XML\KeyInfo\AbstractKeyInfo */ public function getKeyInfo() { return XML\KeyInfo\KeyInfo::getInstance($this->KeyInfo[0]); }