示例#1
0
 public function testPKIDecryptBadKey()
 {
     $obj = new Zend_InfoCard_Cipher_Pki_Adapter_Rsa();
     try {
         $obj->decrypt("Foo", "bar");
         $this->fail("Exception not thrown as expected");
     } catch (Exception $e) {
         /* yay */
     }
 }
示例#2
0
 public function testPKIDecryptBadKey()
 {
     if (!extension_loaded('openssl')) {
         $this->markTestSkipped('The openssl extension is not loaded.');
     }
     $obj = new Zend_InfoCard_Cipher_Pki_Adapter_Rsa();
     try {
         $obj->decrypt("Foo", "bar");
         $this->fail("Exception not thrown as expected");
     } catch (Exception $e) {
         /* yay */
     }
 }