Fix for PHP 5.3 grammar

This commit is contained in:
Stephen Paul Weber 2013-01-26 14:15:09 -05:00
parent cd15aec6f9
commit ae062433b7
1 changed files with 2 additions and 1 deletions

View File

@ -95,7 +95,8 @@ class Decryption extends PHPUnit_Framework_TestCase {
public function testDecryptAsymmetric() {
$m = OpenPGP_Message::parse(file_get_contents(dirname(__FILE__) . '/data/hello.gpg'));
$key = OpenPGP_Message::parse(file_get_contents(dirname(__FILE__) . '/data/helloKey.gpg'));
$m2 = (new OpenPGP_Crypt_RSA($key))->decrypt($m);
$decryptor = new OpenPGP_Crypt_RSA($key);
$m2 = $decryptor->decrypt($m);
while($m2[0] instanceof OpenPGP_CompressedDataPacket) $m2 = $m2[0]->data;
foreach($m2 as $p) {
if($p instanceof OpenPGP_LiteralDataPacket) {