assertSame($verify->verify($m), $m->signatures()); } public function testUncompressedOpsRSA() { $this->oneMessageRSA('pubring.gpg', 'uncompressed-ops-rsa.gpg'); } public function testCompressedSig() { $this->oneMessageRSA('pubring.gpg', 'compressedsig.gpg'); } public function testCompressedSigZLIB() { $this->oneMessageRSA('pubring.gpg', 'compressedsig-zlib.gpg'); } public function testCompressedSigBzip2() { $this->oneMessageRSA('pubring.gpg', 'compressedsig-bzip2.gpg'); } /* public function testUncompressedOpsDSA() { $this->oneMessageDSA('pubring.gpg', 'uncompressed-ops-dsa.gpg'); } public function testUncompressedOpsDSAsha384() { $this->oneMessageDSA('pubring.gpg', 'uncompressed-ops-dsa-sha384.gpg'); } */ } class KeyVerification extends PHPUnit_Framework_TestCase { public function oneKeyRSA($path) { $m = OpenPGP_Message::parse(file_get_contents(dirname(__FILE__) . '/data/' . $path)); $verify = new OpenPGP_Crypt_RSA($m); $this->assertSame($verify->verify($m), $m->signatures()); } public function testHelloKey() { $this->oneKeyRSA("helloKey.gpg"); } }