示例#1
0
 public function testKeyInfoThrowsExceptionOnInvalidInput2()
 {
     $this->setExpectedException('Zend\InfoCard\XML\Exception\InvalidArgumentException', 'Invalid Data provided to create instance');
     KeyInfo\Factory::getInstance(10);
 }
 /**
  * Returns the KeyInfo Block
  *
  * @return \Zend\InfoCard\XML\KeyInfo\AbstractKeyInfo
  */
 public function getKeyInfo()
 {
     return XML\KeyInfo\Factory::getInstance($this->KeyInfo[0]);
 }
示例#3
0
 public function testKeyInfo()
 {
     try {
         KeyInfo\Factory::getInstance("<foo/>");
         $this->fail("Expected Exception Not thrown");
     } catch (\Exception $e) {
         /* yay */
     }
     try {
         KeyInfo\Factory::getInstance(10);
         $this->fail("Expected Exception Not thrown");
     } catch (\Exception $e) {
         /* yay */
     }
 }