コード例 #1
0
ファイル: XmlParsingTest.php プロジェクト: niallmccrudden/zf2
 public function testKeyInfoThrowsExceptionOnInvalidInput2()
 {
     $this->setExpectedException('Zend\InfoCard\XML\Exception\InvalidArgumentException', 'Invalid Data provided to create instance');
     KeyInfo\Factory::getInstance(10);
 }
コード例 #2
0
 /**
  * Returns the KeyInfo Block
  *
  * @return \Zend\InfoCard\XML\KeyInfo\AbstractKeyInfo
  */
 public function getKeyInfo()
 {
     return XML\KeyInfo\Factory::getInstance($this->KeyInfo[0]);
 }
コード例 #3
0
ファイル: XmlParsingTest.php プロジェクト: heiglandreas/zf2
 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 */
     }
 }